Situation:
I have a file with data that has the following format:
ID FLOAT(20),
NAME VARCHAR2(20 BYTE),
TRIBUTE VARCHAR2(4 BYTE),
GOLD VARCHAR2(2 BYTE),
I am going to apply a Regular Expression to find and replace the data with this output (First word of the line, followed by a comma):
ID,
NAME,
TRIBUTE,
GOLD,
Solution in Microsoft Word
The operation in Microsoft Word is this:
Search:<(??*) (*?,)
Replace:\1,
Problem
Now I want to get the same output in Notepad++, but still can't.
Updates Solution in Notepad++:
Reading http://docs.notepad-plus-plus.org/index.php/Regular_Expressions and trying, I have decided the following equivalencies
Busqueda | Word | Notepad++ |
------------------------------------+-----------+---------------|
Principio de línea | < | ^ |
Cómodin un caracterer cualquiera | ? | .? |
Cómodin uno o muchos caracterers | * | .* |
Guardar búsqueda | () | () |
Busquedad Guardada | /# | /# |
A possible solution would be to perform two searches,
first search
Search:^(.?.?.*) (.*),
Replace:\1,
Second Search
Search:
Replace:
(Search for "space" and replace with "nothing")
This should do the trick for you:
Replace with:
See the regular expression