RegEx Not Working with English

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

RegEx Not Working with English

Post by armsys » Mon Apr 01, 2013 2:27 pm


User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Apr 01, 2013 6:04 pm

Works fine for me once I have corrected your typos and syntax errors:

Code: Select all

/*
FullText:
provocateur [ prˆt-ˌvä-kə-'tər ] pro¡Evo¡Eca¡Eteur
*/

LabelToVar>FullText,ClipText


RegEx>[oneormore space],ClipText,1,Matches,num,1,,Text
RegEx>[twoormore crlf],ClipText,1,Matches,num,1,,Text
RegEx>(?m)(^$\x0D\x0A)|(?-m)(\x0D\x0A)+$,ClipText,0,matches,num,1,,ClipText
MDL>ClipText
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Mon Apr 01, 2013 10:39 pm

Hi Marcus,
Thanks for your reply.
Those regex> commands was intended to remove various unwanted characters but non-essential here. I copied it from my various test scripts. Variables such as 'Text' and 'Cliptext' become confusd. Otherwise, I don't other syntax errors.
Those regex> commands merely show after completing running those regex> commands, 'prō-ˌvä-kə-'tər' is deformed.
What do you mean by 'Work fine for me'?
Do you mean that 'prō-ˌvä-kə-'tər' remains intact after running the said Regex> commands?

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Mon Apr 01, 2013 10:48 pm

I update my test script (but I still can't find any syntax/typo errors other than the mixup of Text and ClipText:
/*
FullText:
provocateur [ prō-ˌvä-kə-'tər ] pro•vo•ca•teur
*/
LabelToVar>FullText,ClipText
MDL>ClipText

RegEx>[oneormore space],ClipText,1,Matches,num,1,,ClipText
RegEx>[twoormore crlf],ClipText,1,Matches,num,1,,ClipText
RegEx>(?m)(^$\x0D\x0A)|(?-m)(\x0D\x0A)+$,ClipText,0,matches,num,1,,ClipText
MDL>ClipText

Let>WLN_ENCODING=UNICODE
WriteLn>C:\temp\test.txt,r,Text

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts