I am looking to match strings out of a file that are prefixed
/**
and have a postfix
*/
With any number of characters/whitespace/newlines in between.
eg:
/** anything
anything
*/
I have m/(\/\*\*).*?(\*\/)/ so far, however this does not handle newlines. I know the fix has to be simple, but i have very limited regular expressions experience.
Bonus question: Does anyone have a good website for learning regular expressions?
Add the
smodifier after it:But if it’s source code you’re operating on, be careful:
There really is but one online resource if it comes to learning regex: http://www.regular-expressions.info/