This is so simple but I just can't get it today. I want to use "or" in an easypattern such as this:
Let>text=ABC456123
Let>pattern=ABC[6digits] or XYZ[6digits]
RegEx>pattern,text,1,matches,num,0
MessageModal>matches_1
Now the text could be XYZ456789 or TGO852369 etc. In other words it would not be [3letters][6digits] but 3 certain letters followed by 6 digits.
Using or in an easypattern
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Using or in an easypattern
Try this:
Let>pattern=["ABC" OR "XYZ"][6digits]
Let>pattern=["ABC" OR "XYZ"][6digits]
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Using or in an easypattern
Thank you
EasyPattern Failing
I'm missing something here as the sample below just brings back the "W".
What I really want is the choice of "C" or "WEB" or "EDI" followed by 6 digits which I thought would be
["C" or "WEB" or "EDI"][6digits]
Let>text=WEB007029
Let>pattern=["WEB" or "EDI"]
RegEx>pattern,text,0,matches,num,0
MessageModal>matches_1
What I really want is the choice of "C" or "WEB" or "EDI" followed by 6 digits which I thought would be
["C" or "WEB" or "EDI"][6digits]
Let>text=WEB007029
Let>pattern=["WEB" or "EDI"]
RegEx>pattern,text,0,matches,num,0
MessageModal>matches_1