11/10/14

Scite and regular expression

Hi,

 I don't know if you use Scite editor (http://www.scintilla.org/SciTE.html) but I use this instead of classic Notepad.

The problem of the day (POD) is to transform a very long list of integer (1 2 3 and so on) adding an apex in prefix and suffix.

Yes yes, I know that there are a lot of solutions for do this, one may be to write an assembly program, but the challenge is to do it fast as possible. Regular expression and Scite can be a good solution. Just copy the list of number, CTRL+H (Replace function), Find: \(\d+\) and Replace: '\1', where 1 is the positional group of regular expression.

 Voilà.

 Salvo.

Nessun commento:

Posta un commento