Hi everyone,
I have a file with numbers in it, and I want to to add a comma to the end of each one, but the file has 1'024,000 numbers in a column of varying sizes. How could I do this with a search and replace regular expresion.
before: 1 34 244 5 ..
after 1, 34, 244, 5,
Regards Ed.
This worked with your example data:
Find: ^([0-9]+)$
Replace: $1,
**Leigh
On Wed, Jun 2, 2010, Afflictedd2 edvelez.g@gmail.com wrote:
1 34 244 5
On 2 Jun 2010, at 20:10, Leigh Daniels wrote:
This worked with your example data:
Find: ^([0-9]+)$
Replace: $1,
**Leigh
On Wed, Jun 2, 2010, Afflictedd2 edvelez.g@gmail.com wrote:
1 34 244 5
Also:
* Select all the lines you want to edit, * Click "Text" Menu -> "Edit Each Line in Selection" * Type ","
That'll do every line in the selection though, whereas the find/replace _only_ matches numbers. If you wanted to find/replace on all lines, not just numerical I'd use `$' as the find string and replace with simply `,'.
C --- Caius Durling caius@caius.name +44 (0) 7960 268 100 http://caius.name/
Way cool and even easier!
I didn't know about that--thanks!
**Leigh
On Thu, Jun 3, 2010, Caius Durling caius@caius.name wrote:
- Select all the lines you want to edit,
- Click "Text" Menu -> "Edit Each Line in Selection"
- Type ","
That'll do every line in the selection though, whereas the find/replace _only_ matches numbers. If you wanted to find/replace on all lines, not just numerical I'd use `$' as the find string and replace with simply `,'.