Page 1 of 1
How do I replace all numbers [0-9] with something else?
Posted: Thu Oct 14, 2010 2:57 am
by joeytogo
How do I replace all numbers [0-9] with something else? I was trying [0-9].
Posted: Thu Oct 14, 2010 10:05 am
by ben_josephs
Did you select Regular expression?
The regular expression [0-9] matches any single digit.
The regular expression [0-9]+ matches any non-empty sequence of digits.
Thanks Ben, You are the Text Pad Master!
Posted: Thu Oct 14, 2010 3:05 pm
by joeytogo
Thanks Ben, You are the Text Pad Master!
Hi Ben, I want to replace [0-9] with [0-9], (ie: 1 with 1,)
Posted: Tue Nov 02, 2010 7:32 pm
by joeytogo
Hi Ben, I want to replace [0-9] with [0-9], (ie: 1 with 1,)
this does not work
reg. ex. on
find
[0-9]
replace with
[0-9],
This gives [0-9], rather than the #,.
Can you help?
Posted: Tue Nov 02, 2010 9:08 pm
by ben_josephs
A replacement expression is not a regular expression.
Use
Find what: ([0-9])
Replace with: \1,
or
Find what: [0-9]
Replace with: \0,
The first of these assumes you are using "Posix" regular expression syntax:
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax