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?
Search & Replace doesent work
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
TextPad's regex engine engine doesn't recognise \d as representing any digit. Use [0-9] instead. For example:
\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:
The replacement consists ofFind what: (ICN-BZ-A-000000-A-S3091-00[0-9]{3}-A-)00(-2)
Replace with: \101\2
[X] Regular expression
\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
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?
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?
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm