BeRo1985 / flre

FLRE - Fast Light Regular Expressions - A fast light regular expression library
GNU Lesser General Public License v2.1
94 stars 23 forks source link

^$ should not match final line break #67

Open benibela opened 3 years ago

benibela commented 3 years ago

Here ^$ matches:

f := TFLRE.Create('^$', [rfMULTILINE]);
f.ExtractAll('abcd'+LineEnding+'defg'+LineEnding,matches) ;
writeln(length(matches))

but "on both Java and .NET, there is not considered to be a zero-length line between a final newline character and the end of the string, so if $in is:" (https://www.w3.org/Bugs/Public/show_bug.cgi?id=4543)