Page 1 of 1

RegExp _ SOLVED

Posted: Mon Feb 29, 2016 4:24 pm
by victor Lukenga
Hi !

I Experiment with RegExp i want to Extract a Hyphen without go in scripting

(0, 0, 314.81677, 114.81682) mm

I want to Extract two element

In the "search" field I typed ([0-9]+.[0-9]) and I get 314.8

but how to extract 114.8 ?

Can you help me ?

Re: RegExp

Posted: Tue Mar 01, 2016 11:01 am
by loicaigon
Hi Victor,

An option is to use after/before modifiers to isolate the value:

Image

HTH

Loic
http://www.ozalto.com

Re: RegExp

Posted: Tue Mar 01, 2016 11:49 am
by victor Lukenga
Thank you Loic

I don't know why I didn't think about that ! I feel silly :)

Thank You so much

Re: RegExp _ SOLVED

Posted: Fri Mar 25, 2016 9:48 am
by jan_suhr
Infact the RegEx you wrote will find both the third and fourth segment of your string.

This RegEx will only find the last segment:

Code: Select all

(?!\s)([0-9]+\.[0-9]+)(?=\))
It will exclude the space before and the ) at the end in the result but look for them in the search.

I use a great tool to write the RegEx and it gives you instant feedback on what you do.

http://www.mactechnologies.com/index.ph ... ds#regexrx

Jan

Re: RegExp _ SOLVED

Posted: Tue Apr 05, 2016 3:19 pm
by victor Lukenga
your software is pretty cool !

I like to use this site http://regexr.com/ it's very helpful to build and test your regex