here's my string:
</HEAD>
<BODY>
<html>
<head>
i need to detect the line-breaks so i used [\r\n]+
but the problem is, i need it to be optional - like the filter rule should also work if there are no line breaks at all (between rbody + html) .. how would i do that?
thx
Ivan and qid have it right.
[\r\n]* will match any linebreak characters in any amount, including 0. Using + meant 1 or more, thus the problem you ran into.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With