I am trying to get a regex working but it is giving faults
even after multiple tries.
The regex should recognize purepaths containing
“/drp/statement/” and “/drp/order/” and print whatever is present after these
Regex I have so far: [^/drp/(order|statement)/](.*)$
Value to be tested:
Expected output: for/12345
Getting output: or/12345
Issue: first letter of the output is getting cut for some
According to the documentation page, (https://community.dynatrace.com/community/display/LEARN/Useful+Regular+Expressions),
we can test our regex in the following page: http://www.regextester.com/ and this page says my regex is correct.
Can you please help me figure out why my regex is failing in Dynatrace tester?
There are a few things in your regular expression that I wouldn't do, including use of [...] that looks odd to me, and the extra parentheses in the middle of the pattern. What I'd do is:
The (?: characters open a "non-collecting group" which just means that they work like ordinary parentheses and don't contribute to the result. (Anyway, you can google it.)