Re: [gedit-list] Doubt about regex on gedit



Hi!

This seems to be more of a regex problem than a gedit problem.
My solution would be:

Text:  'Delivered','-48,2365','-23,3256','FXO'
Regex: '-(\d\d)\,(\d\d\d\d)'
Replace regex: '-\1.\2'
Output:  'Delivered','-48.2365','-23.3256','FXO'

\1 and \2 reference the first and second group (The regex in the parentheses

However I did not test it with gedit.

I hope it helps

Best regards

On Tue, Oct 4, 2016 at 9:48 PM, Wagner De Queiroz <wagnerdequeiroz gmail com> wrote:
Dear gedit masters. I use an Ubuntu 16.04-64bits and I have a cruel doubt about how to replace text on gedit using regex.

I love this program because gedit save my life every time when I open a text there. but I have a cruel doubt about how to replace text using regex filter.

I have a long listing of SQL commands where my program make a mistake:

Like this string:

.... 'Delivered','-48,2365','-23,3256','FXO' .......

when we read '-48,2365' and '-23,3256', we need change from ","(comma)  to "."(period)  to imput in another process.

I used this string on Search for edit box: " -\d\d\,\d\d\d\d"  (the find button find all occurences of that text, wonderful)
but what I can put on the replace with textbox? "\d\d.\d\d\d\d" not work.

to change from:

.... 'Delivered','-48,2365','-23,3256','FXO' .......
to
.... 'Delivered','-48.2365','-23.3256','FXO' .......

This are my very first post here, I searched on Google and not found any hint to fix this.

--
Wagner de Queiroz
Be free with Linux

_______________________________________________
gedit-list mailing list
gedit-list gnome org
https://mail.gnome.org/mailman/listinfo/gedit-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]