Pattern Matching Reference - PCRE REGULAR EXPRESSION DETAILS

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Pattern Matching Reference - PCRE REGULAR EXPRESSION DETAILS

Postby DFH » Wed May 16, 2012 7:43 am

This issue has been a stumbling block more times than I can remember, but I always forget.
Happened again today, and it took me ages before I realized why.

^ assert start of string (or line, in multiline mode)
$ assert end of string (or line, in multiline mode)

The issue is this:

When the EOLs are Unix/Amiga style, the ^ doesn't work. It works fine when the EOLs are DOS/Windows.
Not tried it for Mac style EOLs.

David

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Pattern Matching Reference - PCRE REGULAR EXPRESSION DET

Postby DataMystic Support » Wed May 16, 2012 4:59 pm

I found the same thing, although I thought this was addressed in the past.

The perl regex position '^' for the start of the file now works with Unix files.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Pattern Matching Reference - PCRE REGULAR EXPRESSION DET

Postby DFH » Wed May 16, 2012 8:26 pm

Thanks Simon,

How did the bug manage to creep back? Was there a revert in the version control system?

I didn't check whether there was a similar issue with '$' for assert end of string. Did you?

Neither did I check whether the issue also affected Mac EOLs.

David

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Pattern Matching Reference - PCRE REGULAR EXPRESSION DET

Postby DataMystic Support » Wed May 16, 2012 11:32 pm

I think it was more that a change in the underlying pcre engine allowed it to creep in, and yes, it probably does affect Mac EOL's with '$'.

Methinks a new release will be out shortly.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 6 guests