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
Related
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.
here is my web list
mywebsite/
mywebsite/myweb.html
mywebsite/children1
mywebsite/clidrend2
mywebsite/clidrens3
mywebsite/clidrend4
mywebsite/parent1/S2
mywebsite/parent1/S3
mywebsite/parent1/S4
how do I just have
mywebsite/myweb.html
mywebsite/
and ignore the others.
here is my regex
mywebsite/|mywebsite/myweb.html
Done it :-) thanks everyone
^mywebsite\/myweb\.html|mywebsite\/$
Is this what you want as a result?
mywebsite(/m.*|/)
You could try the following, I could be more precise if you show us the regex you are actually using.
(WhateverYouAreUsing){2}
(...) is a group and {...} is a quantifier, it will take exactly two of the matches you are looking for. {1,2} will take at least one and at maximum two, in case there is only one and you still want to get a match.
Put some parentheses in your regex and escape the .:
(mywebsite/)|(mywebsite/myweb\.html)
Alternatively, for something a little more general:
(\w+/)|(\w+/\w+\.html)
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.
As part of my assignment I have to replace words with at least one numeric with the word STOP, Is there any way of doing it using regex?
Words
a1wew
abc
1rr
sd
Output
STOP
abc
STOP
sd
I am using regex of eclipse in find.
Find:
(?=.*\d)\w+
Replace:
STOP
One possible regex is grep '.*[0-9].*'
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 ].
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}$/
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.