Matching special characters and letters in regex

Add them to the allowed characters, but you’ll need to escape some of them, such as -]/\ var pattern = /^[a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};’:”\\|,.<>\/?]*$/ That way you can remove any individual character you want to disallow. Also, you want to include the start and end of string placemarkers ^ and $ Update: As elclanrs understood (and the rest … Read more

li:before{ content: “■”; } How to Encode this Special Character as a Bullit in an Email Stationery?

Never faced this problem before (not worked much on email, I avoid it like the plague) but you could try declaring the bullet with the unicode code point (different notation for CSS than for HTML): content: ‘\2022’. (you need to use the hex number, not the 8226 decimal one) Then, in case you use something … Read more

WebClient.DownloadString() returns string with peculiar characters

 is the windows-1252 representation of the octets EF BB BF. That’s the UTF-8 byte-order marker, which implies that your remote web page is encoded in UTF-8 but you’re reading it as if it were windows-1252. According to the docs, WebClient.DownloadString uses Webclient.Encoding as its encoding when it converts the remote resource into a string. … Read more

Looking for special characters in Google [closed]

Update: this answer is no longer applicable as of 2017. See https://blog.google/products/search/improvements-searching-special-characters-programming-languages/ Google strips most punctuation from queries, as described here, so it won’t help you with the bash syntax. It’s very easy to search for the string “##” in the bash documentation: Just run “info bash”, hit “s”, and enter “##” as the search … Read more

removing emojis from a string in Python

On Python 2, you have to use u” literal to create a Unicode string. Also, you should pass re.UNICODE flag and convert your input data to Unicode (e.g., text = data.decode(‘utf-8′)): #!/usr/bin/env python import re text = u’This dog \U0001f602’ print(text) # with emoji emoji_pattern = re.compile(“[” u”\U0001F600-\U0001F64F” # emoticons u”\U0001F300-\U0001F5FF” # symbols & pictographs … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)