Thanks Sebastian, works a treat. I'm on a Mac and regexbudy only works on Windows. However, I use this: http://pythonregex.com/ Which is very helpful.
Ron Ganbar email: [email protected] tel: +44 (0)7968 007 309 [UK] +972 (0)54 255 9765 [Israel] url: http://ronganbar.wordpress.com/ On 19 April 2012 14:33, Sebastian Elsner <[email protected]> wrote: > One more thing, for testing regex string I prefer to use RegexBuddy > http://www.regexbuddy.com/ > > > On 04/19/2012 01:26 PM, Sebastian Elsner wrote: > > \d+\.?\d* > > works for me. be sure to use a raw string: > > import re > re.findall(r"\d+\.?\d*","0 13 0.3 0.123 4.123 11.123") > > On 04/19/2012 12:42 PM, Ron Ganbar wrote: > > Hey, > what's the regex that will find either an integer or a floating point > number? So it will find 0 | 13 | 0.3 | 0.123 | 4.123 | 11.123? > > Been hitting my head against the wall forever. What I have is this: > ((\d+)|(\d+\.?\d+)) > > Thanks, > Ron Ganbar > email: [email protected] > tel: +44 (0)7968 007 309 [UK] > +972 (0)54 255 9765 [Israel] > url: http://ronganbar.wordpress.com/ > > > > _______________________________________________ > Nuke-python mailing [email protected], > http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > > > -- > Sebastian Elsner - pipeline td - r i s e | fx > > t: +49 30 20180300 [email protected] > www.risefx.com > > r i s e | fx GmbH > Schlesische Strasse 28 Aufgang B, 10997 Berlin > Geschäftsführer: Sven Pannicke, Robert Pinnow > > Handelsregister Berlin HRB 106667 B > > > > _______________________________________________ > Nuke-python mailing [email protected], > http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > > > -- > Sebastian Elsner - pipeline td - r i s e | fx > > t: +49 30 20180300 [email protected] > www.risefx.com > > r i s e | fx GmbH > Schlesische Strasse 28 Aufgang B, 10997 Berlin > Geschäftsführer: Sven Pannicke, Robert Pinnow > > Handelsregister Berlin HRB 106667 B > > > _______________________________________________ > Nuke-python mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > >
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
