Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I need help to write a regex to exclude zip codes :
I need to exclude all following zip codes :
971xx
972xx
973xx
974xx
975xx
976xx
984xx
986xx
987xx
988xx
Can you help me writing the correct expression ?
Thanks
It's seem to me that you want to exclude french DOM-TOM zip code.
How about:
\b(?!97[1-6]|98[4678])\d{5}\b
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
does anyone know how to write the regex for this list of urls for workbox
/
/tracker/patientlist
/tracker/visitlist
/tracker/triage
i am new to regex
Assuming you want to match the root url /, or /tracker/*, try this:
/(tracker/\w+)?
Here is one way.(Not sure what other URI variations you may have, but this should do it). If the first part is always /tracker, then use Bohemian's answer.
(\/[a-zA-Z]+)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
How do read two first letters and delete line?
This code remove all line where is GG
.*gg.*.*.*
ggang - delete
gangg -undelete
Tested in notepad++:
find: ^(gg.*)$
replace: (leave blank)
in:
ggang
gangg
out:
gangg
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have File and I want to replace fix character * : ~ with # using regex but, it should not replace(ignore) B~~ word because, it need to remain as it is. Anybody have idea for that?
Input :
ABCHKLJNKL*dskjnsdfkdsmflkmdls
MLKMLKMLKMLKMLKMMML
zlmlkmm:skjnjnskfjnkjsdnkfjnkdjs
B~~KJNNKJNJNKKJNKJNFKKJNJNK
Output Should be :
ABCHKLJNKL#dskjnsdfkdsmflkmdls
MLKMLKMLKMLKMLKMMML
zlmlkmm#skjnjnskfjnkjsdnkfjnkdjs
B~~KJNNKJNJNKKJNKJNFKKJNJNK
Please provide regex because i want to done with one step.
Thanks
[*:]|(?<!B[~])[~](?![~])
Try this.This should do it.See demo.Replace by #.
https://regex101.com/r/tX2bH4/66
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I could anybody help me out?
I am looking for some regexp to use to validate US Zip codes and Canadian Postal codes in AngularJS
This should work for you:
^(\d{5}(-\d{4})?|[A-Z]\d[A-Z] *\d[A-Z]\d)$
http://regex101.com/r/nO4zF5
Remove the ^ and $ anchors if you don't want to match the start and end of the string.
When using in Javascript remember that you need to use the / delimiter:
if (/^(\d{5}(-\d{4})?|[A-Z]\d[A-Z] *\d[A-Z]\d)$/.test(str)) {
// it's a match!
}
And directly, as an Angular ng-pattern:
ng-pattern="/^(\d{5}(-\d{4})?|[A-Z]\d[A-Z] *\d[A-Z]\d)$/"
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
How do you find the first word after a string literal via regex?
I.e.
I want to extract "DAQJ7PS" from the line:
ERROR service.PostService - Failed to save post DAQJ7PS
/ERROR service\.PostService - Failed to save post (.+)/
will give you the result in the first capturing group. This can be tuned if you have more specific requirements.