Cannot split the word set between 2 word sets

Hi,

There are some types of linebreak in each environment.
Unix style : \n (text in regex101)
Windows style : \r\n

So if we need to handle both type of linebreak, I recommend to use \r?\n instead of \n. ( or (\r?\n) if quantifier exists after it) as linebreak.
The above expression might be better like

(?<=modification \.\r?\n)(.|\s)*?(?=\*If you do not know)

Regards,

1 Like