Position>

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

Position>

Post by ABIVEN » Sun Oct 11, 2015 7:44 am

Hello

I have of string of 9 figures for example 471009123
Keeping THIS example :
I search a fast tip which returns 0 (or anything else) if no zero are
in positions 1 and 8 & 9 (here 4 and 23)
Position> is good with –start- but would be better with –end- !

Regards

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

Re: Position>

Post by armsys » Sun Oct 11, 2015 8:13 am

If nm returns 1 (one), then a match is found to satisfy your conditions.

Code: Select all

Let>string=471009123
*----------123456789
Let>regex=^([^0])\d{6}(?1){2}$
RegEx>regex,string,0,match,nm,0
If>nm>0
  MDL>A match is found.
Endif

ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

Re: Position>

Post by ABIVEN » Sun Oct 11, 2015 7:46 pm

Thanks armsys

I could not make it up !

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

Re: Position>

Post by armsys » Sun Oct 11, 2015 8:29 pm

Glad to know you've solved your problem.

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