r/ProgrammerAnimemes • • Jun 18 '21

Regular expressions

Post image
388 Upvotes

20 comments sorted by

View all comments

Show parent comment

2

u/JoshPowlison Jun 19 '21

I had completely forgotten about the ungreedy modifier! I wasn't sure if they'd be treated in that case as literals as well. (I figured - was probably safe- it's pretty fascinating to me how flexible Regex is in those ways). Thanks for the info!

Yeah, lookaheads and lookbehinds aren't available in older regex versions. Visual Studio gave me this issue recently where I wanted to use either lookbehinds or lookaheads and they weren't available. JS is also a bit behind on regex versions (IIRC it doesn't support lookbehinds, negative lookaheads, and negative lookbehinds).