Capturing between phrases across multiple lines

Published on Tue Mar 01 2022

Discussion https://www.reddit.com/r/regex/comments/kxtyl6/capturing_between_phrases_across_multiple_lines/ https://www.reddit.com/user/Pauley0/

Additional matching regexes for
Capturing between phrases across multiple lines

Capturing between phrases across multiple lines

Discussion https://www.reddit.com/r/regex/comments/kxtyl6/capturing_between_phrases_across_multiple_lines/ https://www.reddit.com/user/Pauley0/

ServiceNow - Retrieve text from an Email

retrieve multiple lines from an email body.

extract java property name and value

correctly handle the case where the value is splitted on multiple lines.

semver

Semantic Versioning regex pattern according to Tom Preston-Werner http://semver.org/ https://github.com/mojombo/semver/blob/master/semver.md First version of this regex follows semver 2.0.0. Discussion of semver and this regex was posted on https://github.com/mojombo/semver.org/issues/59

semver

Semantic Versioning regex pattern according to Tom Preston-Werner http://semver.org/ https://github.com/mojombo/semver/blob/master/semver.md Substitutes http://regex101.com/r/gG8cK7/1 following discussion on semver https://github.com/mojombo/semver.org/issues/59

Strip Email ID from Name

Use this regex to select all characters up to the "<" bracket. Then, reverse the direction of the bracket to select the closing ">" bracket. It works across multiple lines. You can get an email list with only the IDs. This is the pattern it matches: Alpha Person <[email protected]> Step 1 (.*) [$<$] gives you [email protected]> Step 2 [$.$] (.*) gives you [email protected]

Remove multiple white spaces between words

Remove multiple white spaces between words and replace it with the char of your choosing.

Find Reddit Threads

Simply searches for the thread-id in any kind of valid reddit-URL.

Word wrap text

(Directly inspired by https://macromates.com/blog/2006/wrapping-text-with-regular-expressions/ ) This version only splits between words, so lines may wrap earlier than the given maximum. Passes existing linefeed through "as‐is", so probably not useful for reflowing already wrapped text

Multiple emails seperated with comma

Multiple emails seperated with comma allowed multiple dot ltds