in reply to Re^2: advance Regex
in thread advance Regex

The first one says to capture everything from the first P of Putative up to but not including the first following semi-colon. Subsequently the whitespace is collapsed.

The second one says to capture everything after "TITLE" and its trailing space(s) up to but not including a newline followed by whitespace followed by "JOURNAL" (which is the following key). Again, subsequently the whitespace is collapsed.

Both of these require the /s modifier. See perldoc perlre for details of the modifiers. You can also fall back on YAPE::Regex::Explain for any regexen that you are having trouble understanding, although it doesn't include support for more modern features, alas.

Replies are listed 'Best First'.
Re^4: advance Regex
by shabird (Sexton) on Apr 28, 2020 at 13:32 UTC

    Thank you so much for explaining :)