WILDEDIT: WildCard search/replace

General questions about using WildEdit

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

Post Reply
skwareks
Posts: 15
Joined: Wed Mar 02, 2005 6:36 pm
Location: Toronto

WILDEDIT: WildCard search/replace

Post by skwareks »

Hi,

I have small problem. I need to delete the code below from 250 text files.

<field name="FILEREV" presence="hidden" y="7.112mm" x="128.524mm" w="4.23mm" h="4.5mm">

The problem is that x and y are not constant. They are different in every file.

I tried

<field name="FILEREV" presence="hidden" y="*****mm" x="*****mm" w="4.23mm" h="4.5mm">

but it is not working. Does anyone knows what should be used when the data to be replaced changes?

Thanks,
Sebastian
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Re: WILDEDIT: WildCard search/replace

Post by MudGuard »

WildEdit uses regular expressions, not wildcards.

To match any number with an optional . in it use [0-9.]+

i.e.:

<field name="FILEREV" presence="hidden" y="[0-9.]+mm" x="[0-9.]+mm" w="[0-9.]+mm" h="[0-9.]+mm">
skwareks
Posts: 15
Joined: Wed Mar 02, 2005 6:36 pm
Location: Toronto

THANK YOU!

Post by skwareks »

Many Thanks! :D
skwareks
Posts: 15
Joined: Wed Mar 02, 2005 6:36 pm
Location: Toronto

Post by skwareks »

hmmm it didn't work. WildEdit didn't find a match.

When I put FIND What:

<field name="FILEREV" presence="hidden" y="7.112mm" x="128.524mm" w="4.23mm" h="4.5mm">

it finds it.

when I put:

<field name="FILEREV" presence="hidden" y="[0-9.]+mm" x="[0-9.]+mm" w="[0-9.]+mm" h="[0-9.]+mm">

nothing

should i put [0-9.]+ for every number?

Thanks,
Sebastian
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Did you check the box "Regular expression"?

Whether you need to replace all numbers I can't say. You should know which of the numbers are varying and which are not …
skwareks
Posts: 15
Joined: Wed Mar 02, 2005 6:36 pm
Location: Toronto

Post by skwareks »

Yes, RE is check. And it is not working. What I meant about the numbers: Should I put [0-9.]+ for every number that is

field name="FILEREV" presence="hidden" y="[0-9.]+mm" x="[0-9.]+mm" w="[0-9.]+mm" h="[0-9.]+mm">

very strange that it is not working... :(
Post Reply