Search & Replace doesent work

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Relikt
Posts: 5
Joined: Fri Mar 26, 2010 10:23 am

Search & Replace doesent work

Post 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?
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post 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
Relikt
Posts: 5
Joined: Fri Mar 26, 2010 10:23 am

Post 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?
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post 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}
Relikt
Posts: 5
Joined: Fri Mar 26, 2010 10:23 am

Post by Relikt »

Thank You! Its works done!
paleolith
Posts: 46
Joined: Sun Jun 26, 2005 6:25 pm
Contact:

Post 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. :shock: :shock:

Edward
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

No. The thread was moved.
paleolith
Posts: 46
Joined: Sun Jun 26, 2005 6:25 pm
Contact:

Post by paleolith »

Ah, I see, thanks. It's confusing when moving a thread doesn't post and entry with that info.

Edward
Post Reply