Nice work. That's a very useful tip there. Thanks. Mark
--- In [email protected], "Cifelli, Scott T." <[EMAIL PROTECTED]> wrote: > > Bruce, > > The number value that I'm after can be any length, so what you provided > is not quite what I needed...but close. Thanks for steering me in the > right direction though. It turns out the regular expression was pretty > straightforward for what I needed once I determined I was using the > appropriate transformer. I just used an expression of "[0-9]+" and this > will return the first integer value found in the string...which is > exactly what I was after. > > Thanks again! > > Scott > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of > Bruce Harold > Sent: Wednesday, August 01, 2007 5:25 PM > To: [email protected] > Subject: RE: [fme] Data cleaning question > > > > 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 > > www.gis.co.nz <http://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. > For insights into what's up at Safe Software and what's on the development horizon, visit Safe's blog at spatial-etl.blogspot.com. Love FME? Then open your diary to March 6-7, 2008 and write this... "Second Worldwide FME User Conference - Must Attend!" See http://www.safe.com/company/fmeuc2008/index.php for more details. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/fme/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/fme/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> 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/
