4 ms·
Nice intro. Tangential question. Is there a regex tool that shows where the expression failed ? Not in syntax, but the logical failure point? Would be useful fo
by binstub 6y ago
Nice intro. Tangential question. Is there a regex tool that shows where the expression failed ? Not in syntax, but the logical failure point? Would be useful for when an expression gets a little long and nested and modifications need to be made.
Edit: I mean like:
Target text is abcde
Regex is /abe/
Is there a tool that will tell me it matched a and b and then failed trying to match e ?
Those sites are great resources but they are showing pass/fail and do show an excellent breakdown when something satisfies the expression, but I’m just wondering if there is something that shows partial matching until the failure point?
- nickysielicki 6y agohttps://regexr.com/ https://regexr.com/ https://regex101.com/ https://regex101.com/ These websites have saved me hours of time at this point.
- bmn__ 6y agoYou want a debugger. http://p3rl.org/rxrx http://p3rl.org/rxrx rxrx -e'"abcde" =~ /abe/' Demo: https://blog-cloudflare-com-assets.storage.googleapis.com/2019/07/23-steps-1.gif https://blog-cloudflare-com-assets.storage.googleapis.com/20... http://p3rl.org/re#'debug'-mode http://p3rl.org/re#'debug'-mode perl -Mre=debug -e'"abcde" =~ /abe/' ---- https://stackoverflow.com/questions/2348694/how-do-you-debug-a-regex https://stackoverflow.com/questions/2348694/how-do-you-debug...
- binstub 6y agoWow, where have I been. That’s awesome. Exactly what I was looking for . Thanks. My Google fu obviously is lacking.