DEV Community

A-li-ef
A-li-ef

Posted on

 

Answer: Why does nextgroup not match newline without trailing whitespace?

If a match ends immediately before \n, the nextgroup argument will be ignored unless skipnl is also specified, even if one of the groups in nextgroup would have matched starting with \n.

In the given example, since the first Foo match ends immediately before \n and Foo does…

Top comments (0)

Dark Mode

🌚 Friends don't let friends browse without dark mode.

Just kidding, it's a personal preference. But you can change your theme, font, etc. in your settings.