Page 1 of 1

How to remove space character before some expressi

Posted: Wed Jul 22, 2009 8:05 am
by Simple
Dear Sir,

I try a lot to remove space character before some expression but not success

it's like when you want to remove space before comment,
on this example

Ex:
G0 G90 X10 Y10 ; move x and y to 0 position
X-100 Y100 ;move x and y to touch surface

Text after replace:
G0G90X10Y10; move x and y to 0 position
X-100Y100;move x and y to touch surface


Please help me to make regular expression
Thanks a lot

Best Regards,
Simple

Posted: Thu Jul 23, 2009 1:48 pm
by DV
It's a bit tricky and depends on your data, whether you have lots of different line variations or not

For the first line you could use something like:
RegEx: (G[0-9].*) (G[0-9].*) (X[0-9].*) (Y[0-9].*) ;
Replace: $1$2$3$4;


Posted: Fri Jul 24, 2009 5:51 am
by Simple
Thanks you

but my data have a lot of variations