Scott

 

If your integer is fixed width the Grepper can do it with a pattern
[0-9][0-9][0-9].  That pattern will pick out a 3-digit integer from within
the values.

 

Cheers

 

Bruce.

 

Bruce Harold

Geographic Information Solutions

 <http://www.gis.co.nz> www.gis.co.nz

Ph. (64) (0) 9 537 3247

Mb. (+64) (0) 21 2995995

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Cifelli,
Scott T.
Sent: Thursday, 2 August 2007 7:02 a.m.
To: [email protected]
Subject: [fme] Data cleaning question

 

Hi All- 

I was wondering what the easiest way is to clean an attribute and trim it to
just an integer value.  I have a column of data that holds alpa-numeric
values in essentially a free-form field and I would like to just find the
integer value in it and drop the rest.  An example of the values that can be
found in this field are:

123 
123x 
123x4 
123-4 
x123 
123 - 1 
123 (4) 
123 1/2 

.and probably a few other combinations. But in every case, I would only like
the value 123 to be returned.  I've looked thru the available transformers
in workbench and cannot see any easy way to achieve this globally..rather,
it seems as though I would have to look for every case.  I know in some
languages, you can just do an integer conversion on a field like this and it
will just return the number value (except maybe the case where an alpha is
first..but I can handle that easy enough).

At any rate, just wondering what the best (read easiest) way is to do this
type of cleanup. 

Thanks in advance, 

Scott Cifelli 
GIS Systems 

 

****************************************************************************
****
This e-mail and any files transmitted with it, are confidential to National
Grid and are intended solely for the use of the individual or entity to whom
they are addressed. If you have received this e-mail in error, please reply
to this message and let the sender know.

 

Reply via email to