T
Toki Toki
Hi all,
Is it possible to use ruby like awk, sed or cut in unix to editing
strings?
Let say I have to write INSERT query like this:
This is the first (1°) item.
This is the second (2°) item.
This is the third (3°) item.
...
In one file I have the word-number (first, second, third) and in another
file I have the real number (1°, 2°, 3°) of the item, both on each line.
Of course, I don't want to really write it, so how can I "edit" the
number of the item dinamically? I've tried with regex, but I haven't
found a solution...
I think that with some text editors maybe it's possible to do that, but
I would like to know if with ruby the result can be achieved easier.
Let me know.
Thanks.
Best regards.
Is it possible to use ruby like awk, sed or cut in unix to editing
strings?
Let say I have to write INSERT query like this:
This is the first (1°) item.
This is the second (2°) item.
This is the third (3°) item.
...
In one file I have the word-number (first, second, third) and in another
file I have the real number (1°, 2°, 3°) of the item, both on each line.
Of course, I don't want to really write it, so how can I "edit" the
number of the item dinamically? I've tried with regex, but I haven't
found a solution...
I think that with some text editors maybe it's possible to do that, but
I would like to know if with ruby the result can be achieved easier.
Let me know.
Thanks.
Best regards.