Hi

I just did a bit of testing of the expresions from my last mail, and it look 
like it is not the full regular expresion syntax there is implementet in the 
@SearchList() , but the first example is woorking

I have attatched a small mapping file you can use to test the different 
expresions

NB If you just have a few legal values you coul combine the SearchList with 
a lookup table, i normaly use Lookup tables ( or global variables ) for the 
IN like testing you are looking for

Have a nice weekend - its evning in denmark now.
Peter



>From: "peter laulund" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: RE: [fme] ARE question
>Date: Fri, 18 Aug 2006 08:32:17 +0000
>
>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
>
>
>
>
>
>
>

_________________________________________________________________
Få de bedste søgeresultater med MSN Search:  http://search.msn.dk


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/
 
/* ============================================================================

  Navn          : Peter Laulund, KMS

  Oprettet dato : 03 juli 2006 - 13:53

  Beskrivelse   :

  Problemer     :


============================================================================*/

# ============================================================================= # -----------------------------------------------------------------------------
MAPPING_FILE_ID "Version 1.0, 03 juli 2006"

#LOG_FILENAME  $(FME_MF_DIR)TEST.LOG
LOG_APPEND    no

#FME_DEBUG MAPPING_FILE

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
INCLUDE [ puts "MACRO mfRoot $(FME_MF_DIR_UNIX)" ]

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DEFAULT_MACRO SourceFormat    NULL
DEFAULT_MACRO DestFormat      NULL

DEFAULT_MACRO SourceDataset   nullin
DEFAULT_MACRO DestDataset     nullout

DEFAULT_MACRO SourceCoordSys  UTM32-EUREF89
DEFAULT_MACRO DestCoordSys    S34S
DEFAULT_MACRO Dim             2D

READER_META_ATTRIBUTES        fme_feature_type fme_dataset fme_basename

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
READER_TYPE               $(SourceFormat)
READER_KEYWORD            INPUT
INPUT_DATASET            "$(SourceDataset)"

WRITER_TYPE               $(DestFormat)
WRITER_KEYWORD            OUTPUT
OUTPUT_DATASET           "$(DestDataset)"

# ============================================================================= FACTORY_DEF * CreationFactory \ FACTORY_NAME "Opret dummy feature" \ 2D_GEOMETRY 718447 6171283 \ NUMBER_TO_CREATE 1 \ OUTPUT FEATURE_TYPE * \ @SupplyAttributes(I, abc) \ @SupplyAttributes(lst{0}.a, abc) \ @SupplyAttributes(lst{1}.a, abc1001ab) \ @SupplyAttributes(lst{2}.a, 12032) \ @SupplyAttributes(lst{3}.a, 1234) \
    @SupplyAttributes(lst{4}.a, xxabc)

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FACTORY_DEF * TeeFactory \ FACTORY_NAME "Output Transformer" \ INPUT FEATURE_TYPE * \ @SupplyAttributes(retval, @SearchList(lst{}.a,^[1-9][0-9][0-9][0-9]$,REGULAR_EXPRESSION) ) \ OUTPUT FEATURE_TYPE * \
     @Log("Output logger", 3, 1)

# =============================================================================
INPUT *

OUTPUT *

# ----------------------------------------------------------------------------- # =============================================================================

Reply via email to