Page 1 of 1
Search & Replace doesent work
Posted: Fri Mar 26, 2010 10:30 am
by Relikt
Hi
I search the follow string:
ICN-BZ-A-000000-A-S3091-00\d{3}-A-00-2
The \d{3} means 3 numbers.
I want now this sting replace with:
ICN-BZ-A-000000-A-S3091-00\d{3}-A-01-2
(look at the end ..01-2)
After Replace must be like this (example):
ICN-BZ-A-000000-A-S3091-00123-A-01-2
They have any idea?
Posted: Fri Mar 26, 2010 11:10 am
by ben_josephs
TextPad's regex engine engine doesn't recognise
\d as representing any digit. Use
[0-9] instead. For example:
Find what: (ICN-BZ-A-000000-A-S3091-00[0-9]{3}-A-)00(-2)
Replace with: \101\2
[X] Regular expression
The replacement consists of
\1 - what was matched by the first parenthesised subexpression
01 - itself
\2 - what was matched by the second parenthesised subexpression
This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
Posted: Fri Mar 26, 2010 11:43 am
by Relikt
Thank you for your advice!
The result looks like this:
A
But i can't find your quote about "use POSIX regular expression syntax".
I have the version 1.1.
In option you have "Use POSIX extended, rather then ECMA Script syntax and rules".
The "Regular expression" and the "Repacement format" is checked.
What can i do to solve the problem?
Posted: Fri Mar 26, 2010 11:53 am
by ben_josephs
You are asking about WildEdit in a TextPad forum.
In WildEdit version 2, try
Search for: (ICN-BZ-A-000000-A-S3091-00\d{3}-A-)00(-2)
Replace with: ${1}01${2}
Posted: Mon Mar 29, 2010 5:46 am
by Relikt
Thank You! Its works done!
Posted: Thu May 20, 2010 4:34 pm
by paleolith
ben_josephs wrote:You are asking about WildEdit in a TextPad forum.
The problem is long solved, but I wanted to point out that the OP
was asking in the WildEdit forum.
Edward
Posted: Thu May 20, 2010 4:52 pm
by ben_josephs
No. The thread was moved.
Posted: Thu May 20, 2010 5:11 pm
by paleolith
Ah, I see, thanks. It's confusing when moving a thread doesn't post and entry with that info.
Edward