Regular expressions that cross lines

The Endeavour 2025-12-19

Summary:

One of the fiddly parts of regular expressions is how to handle line breaks. Should regular expression searches be applied one line at a time, or should an entire file be treated as a single line? This morning I was trying to track down a LaTeX file that said “discussed in the Section” rather than […]

The post Regular expressions that cross lines first appeared on John D. Cook.

Link:

https://www.johndcook.com/blog/2025/12/19/regular-expressions-that-cross-lines/

From feeds:

Statistics and Visualization » The Endeavour

Tags:

computing

Authors:

John

Date tagged:

12/19/2025, 17:58

Date published:

12/19/2025, 09:55