Regular expression to remove fancy apostrophe [closed] - regex

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need to send SMS to my subscribers through the API, the API doesn't support fancy apostrophe, so i would like to remove that from the message before send it to the user. So i'm looking for a regular expression that should remove the fancy apostrophe and any other unsupported characters, at the same time message can have special characters.

You can use \u to allow any unicode character. If you have a limited set of unsupported characters that can be listed, then you can use character class negation by enclosing the unsupported characters in [^ and ].

Related

Construct a Regex matching a password [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
How would you construct a regex matching a password that must consist of 6 to 16 characters and contain at least one number or special character?
You need to define what constitutes special characters for you.
Something like this regex should work:
(?=^.*?[\d#;:'"()`~#!%$&=-])^.{6,16}$

CLIA Regular Expression [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need a regular expression for CLIA number. CLIA number is combination alpbh numeric without any spaces. Now i am using this expression /^[A-Za-z0-9]{10}$/ am i using correct expression?
you can use this....
/^[a-Z]{4}[0-9]{6}$/
^ this is used to beginning of the line.
$ end of the line.
a-Z this will match the both cases.
this case will match the four alpha character and six numbers. so totally 10 alphanumbers.
Based on your example, it sounds like you want the first four characters to be "CLia" followed by 6 digits? If so, use /^CLia\d{6}$/. If not, be more specific.
If your language support POSIX classes :
/^[[:alnum:]]{10}$/

I need to check a Regular expression [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a excel file that must have this name format, where xxx is a number and yymmdd is a date. Only xxx and yymmdd change, the rest is always the same.
CDFSDDRCxxxCurryymmdd.xls
What is a regex I can use to check if it is correct??
Try with following regex:
^CDFSDDRC\d{3}Curr\d{6}\.xls$
In C# I think you can try something like this :
"CDFSDDRC(?<xxx>[0-9]+)Curr(?<yymmdd>[0-9][0-9][0|1][0-9][0-3][0-9])\.xls"
But you will have to check matches.Groups["yymmdd"].value once more to check for special cases such as CDFSDDRC123Curr321539.xls that match but contains an incorrect date.
I think the following should work.
CDFSDDRC\d[3]Curr(([0-9]{2}(0[13578]|1[02])(0[1-9]|[12][0-9]|3[01]))|([0-9]{2}(0[469]|1[1])(0[1-9]|[12][0-9]|30))|([0-9]{2}(02)(0[1-9]|1[0-9]|2[0-8]))|((((04|08|[2468][048]|[13579][26]))|00)(02)29))\.xsl
I think that you have to escape the backslashes in the C# string.
"CDFSDDRC\\d[3]Curr(([0-9]{2}(0[13578]|1[02])(0[1-9]|[12][0-9]|3[01]))|([0-9]{2}(0[469]|1[1])(0[1-9]|[12][0-9]|30))|([0-9]{2}(02)(0[1-9]|1[0-9]|2[0-8]))|((((04|08|[2468][048]|[13579][26]))|00)(02)29))\\.xsl"

I need Regular expression [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need a regular expression which can detect 5 consecutive occurrences of any digit or character as given in below examples :
A11111C2 – INVALID
AAAAAAA21 – INVALID
12AXXXXX – INVALID
GGGG112 – VALID
You can match five consecutive characters with (.)\1\1\1\1. So .*(.)\1\1\1\1.* matches all your invalid cases.
The \1 is a backreference, so it only matches exactly what the first group (.) matched.

Allow dots in URL using regex [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
How can I allow a dot in an URL using Regex? Any advice?
thanks
\. will allow you to match a dot. How you insert that into your regex depends on how you've created your regex.
. in a regex allows any character (except newlines, depending on the engine and its options), so you have to escape it as \.
Since you're being vague, so will I:
\.
There's the regex to allow a dot.
use the \ to escape native match chrs