[sword-devel] What is wrong with my regexes? Help appreciated

David Haslam d.haslam at ukonline.co.uk
Mon Oct 26 11:42:06 MST 2009

Try toggling your text editor to Show All Characters? (including EOL

Sometimes hidden characters can be the root cause of the unexpected
behaviour of pattern matching.

Non-standard EOL markers caught me out once or twice.

-- David

Peter von Kaehne wrote:
> I am working on a lengthy Farsi text with the help of a perl script 
> which has slowly grown into a great tool.
> But some patterns refuse to budge and I am totally clueless what to do.
> Original text
> متی
> starting at position 1 and ending the line with a return.
> My regex
> s/^متی$/<title>$&<\/title>/;
> finds all lines with the word at whatever in sentence position - instead 
> of picking only lines with the single word متی on the line.
> What am I doing wrong?
> Thanks
> Peter
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

View this message in context: http://www.nabble.com/What-is-wrong-with-my-regexes--Help-appreciated-tp26061783p26065156.html
Sent from the SWORD Dev mailing list archive at Nabble.com.

More information about the sword-devel mailing list