I would like to split my string when there is a new line (<br />) followed by a digit.
For example:
"aaaaaa<br />1 asdsad" // should be split
"bbbbbb<br />dfffgdft" // should not be split
"cccccc<br />2 asdasd" // should be split
etc…
Thank you very much for your help
I’ve used
\s*instead of a space, and made the/optional, so that it also allows<br>,<br/>etc.(?=\d)is a look-ahead, which produces a valid match only if the following characters are matched.