Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

August 9, 2015

Desperately Seeking a Regex

Filed under: Programming,Regex — Patrick Durusau @ 11:00 am

A Javascript regex to match a regex was posted to Stackoverflow (formerly computer programming) by Mike Samuel:

/\/((?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+)\/((?:g(?:im?|m)?|i(?:gm?|m)?|m(?:gi?|i)?)?)/

Along with a nifty explanation and caveats about its use.

Other candidates?

Thinking this could be very useful for mining regexes out of discussion groups, etc.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress