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.
Problems with Anchors
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2229
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
$ doesn't work as expected because the library we use expects Unix end of lines.
Try
"^This is a test[\r\n]
Instead.
Try
"^This is a test[\r\n]
Instead.
Regards,
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
-
- Posts: 4
- Joined: Thu May 12, 2005 5:34 am
- DataMystic Support
- Site Admin
- Posts: 2229
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
I think it is documented, but I will check.
Regards,
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads