Hi

to get any number between 1000 and 9999 try this

^[1-9][0-9][0-9][0-9]$

or

^[1-9][0-9]{3}$

or

^[[:digit:]]{4}$

or

^\d{4}$


you need the ^ and $ to see that the string is just 4 caracters long, 
otherwise it will give you the index to any string contaning a 4 digit 
number - like the first line in this mail

regular expressions are just so poverfull, but can be quite tricky to learn, 
especially as you can formulate the same expression in many ways,


Peter





>From: "Bruce Harold" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: <[email protected]>
>Subject: RE: [fme] ARE question
>Date: Fri, 18 Aug 2006 17:31:11 +1200
>
>Hi Jason
>
>Thanks for that, but I did try the pipe-separated approach (1001 | 1002 
>...)
>and I got the fatal, and anyway my search numbers are not a simple sequence
>so I can't do the range thing - I have numbers like 1001, 2054, 1098 blah
>blah blah.
>
>I also tried (1001) | (1234) and various permutations but no joy.
>
>I'm really looking for the ARE equivalent of the IN operator in SQL.
>
>Cheers
>
>Bruce
>
>PS: Anyone swing past the SAFE stand at the ESRI user conference the other
>day?  Some of the staff were working very long hours...
>
>Bruce Harold
>Geographic Information Solutions
>www.gis.co.nz
>Ph. (64) (0) 9 537 3247
>Mb. (+64) (0) 21 2995995
>-----Original Message-----
>From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jason
>Birch
>Sent: Friday, 18 August 2006 3:43 p.m.
>To: [email protected]
>Subject: RE: [fme] ARE question
>
>Maybe:
>
>^(100[1-3])$
>
>or:
>
>(100[1-3])
>
>or:
>
>100[1-3]
>
>or something more verbose like:
>
>1001|1002|1003
>
>I haven't used regex with the ListSearcher before, so I don't know if you
>need the start/end characters ^$ or grouping ()
>
>Jason
>
>________________________________
>
>From: [email protected] on behalf of Bruce Harold
>Sent: Thu 2006-08-17 6:44 PM
>To: FME Group
>Subject: [fme] ARE question
>
>
>
>Hello All
>
>
>
>I'm struggling with advanced regular expression syntax.  I want to use an
>ARE in a LISTSEARCHER "Search For" input.
>
>I am searching for a set of numbers like 1001,1002,1003 so that if any of
>the candidate numbers is a list member I get it's index.
>
>
>
>I try (and don't go blind counting braces and pipe characters):
>
>
>
>[1][0][0][1] | [1][0][0][2] | [1][0][0][3]
>
>
>
>But it fatals the translation.
>
>
>
>Anyone out there sharp on ARE's?
>
>
>
>Thanks
>
>
>
>Bruce.
>
>
>
>Bruce Harold
>
>Geographic Information Solutions
>
>www.gis.co.nz <http://www.gis.co.nz>
>
>Ph. (64) (0) 9 537 3247
>
>Mb. (+64) (0) 21 2995995
>
>
>
>
>
>
>Join us at the FME Worldwide User Conference Sept. 21-22, 2006 Vancouver BC
>Canada. For more information, visit www.safe.com/2006uc.
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>Join us at the FME Worldwide User Conference Sept. 21-22, 2006 Vancouver BC 
>Canada. For more information, visit www.safe.com/2006uc.
>Yahoo! Groups Links
>
>
>
>
>
>

_________________________________________________________________
Få 250 MB gratis lagerplads på MSN Hotmail:  http://www.hotmail.com





Join us at the FME Worldwide User Conference Sept. 21-22, 2006 Vancouver BC 
Canada. For more information, visit www.safe.com/2006uc.   
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to