Using multiple lines and single line modifiers together - ms

Q

What happens if I use multiple lines modifier, m, and single line modifier, s, together?

How to write a regular expression to capture each bullet statement from this sample text:

✍: FYIcenter.com

A

If both multiple lines modifier, m, and single line modifier, s, are specified together, the regular expression will behave as:

  • The wildcard character "." will match any character including the newline character.
  • "^" and "$" will match the start or end of any line in the string.

With the given example subject string, we can use this regular expression to capture each bullet statement: with single line modifier 's' and multiple line modifier 'm' both specified:

Click the button to test this regular expression here online:

2013-02-02, 0👍, 0💬