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]+)
Related
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 6 years ago.
Improve this question
This regex !^/js/ excludes js, how can I add the word blog in there?
Context: Using in htaccess IE RewriteCond %{REQUEST_URI} !^/js/
Your question is totally unclear, if you want to match the path /blog/js:
!^/blog/js/
If you want to match js or blog:
!^/(blog|js)/
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 7 years ago.
Improve this question
I need help with a really simple regex find/replace command for Eclipse. It'd be great if you could provide me with something to try.
I need to replace all occurrences of the text typeSingleton(*) ), with typeSet({ * } ).
Assume that inside brackets you may have letters, brackets, spaces, then:
Find: typeSingleton\(([a-z ]+(\([a-z ]+\))? ?)\)
Replace: typeSet({$1})
EDIT
Demo: https://regex101.com/r/dD0wK0/1
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 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 want to parse the values between -. but for some data like 1st url contains -- so in that case i need to get the gap only and the next one i am able to get **camry** successfully by using *(site_data,'[^-]+',1,2)*. but i want to handle the gap as well.
U=Google--undefined|http://www.google.com/urlsa=t&rct=j&q=&esrc=s&frm=1&source=web&cd=2&ved=0CFMQFjAB&url=http://www.toyota.com/tundra/features.html&ei=-zwQUvOyGIXu2QWC7oGgBg&usg=AFQjCNFQKGcr2dbDeC-0zagtYdKFEfXXzQ&bvm=bv.50768961,d.aWc
U=Bing-camry-undefined|http://www.bing.com/searchq=camry&pc=MOZI&form=MOZSBR
Please help on this.
You can extract the string along with the hyphens, and then trim the hyphens.
trim('-' from regexp_substr(site_data,'-[^-]*-'))
Alternatively, you can also use regexp_replace function.
regexp_replace(site_data,'(-([^-]*)-)|(.)','\2')
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.