Closed gamato closed 7 years ago
There's no need for the ^
character there...
What do you mean? Without ^
it would match whitespace in any place, while I want to match it only at the beginning of lines. But that's not the point here anyway. The point is that our regex_extract()
runs into an infinite loop. And yes, it fails without ^
too, maybe even in more cases.
Btw, it's not about whitespace either, it gets stuck easily with any other characters. :-/
While this works as expected:
The following never finishes:
Note the missing space char in the searched string. It breaks if any leading whitespace is removed there (e.g.
" qaz\n\twsx\nedc"
).