Page 1 of 1

Problems with Anchors

Posted: Fri Jun 17, 2005 7:37 am
by randersoniii
I am trying to write a perl pattern where the entire line matches. So, for the text "This is a test", I have tried "^This is a test$". While this seems to work in other programs (RegexBuddy), I get no matches if I type the following into the trial input:
This is a Test
This is a Test 2
This is a Test

I know this should be simple, but it's not clear what I am doing wrong. I have also tried an easypattern with similar results.

Posted: Fri Jun 17, 2005 3:28 pm
by DataMystic Support
$ doesn't work as expected because the library we use expects Unix end of lines.

Try

"^This is a test[\r\n]

Instead.

Posted: Sat Jun 18, 2005 1:01 am
by randersoniii
OK, thanks...

This is one you should fix or write up in help. I lost a couple of hours assuming it was something I didn't understand.

Posted: Mon Jun 20, 2005 9:59 am
by DataMystic Support
I think it is documented, but I will check.