Page 1 of 1

WILDEDIT: WildCard search/replace

Posted: Wed Mar 02, 2005 6:41 pm
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

Re: WILDEDIT: WildCard search/replace

Posted: Wed Mar 02, 2005 7:00 pm
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">

THANK YOU!

Posted: Wed Mar 02, 2005 8:10 pm
by skwareks
Many Thanks! :D

Posted: Wed Mar 02, 2005 8:16 pm
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

Posted: Wed Mar 02, 2005 8:30 pm
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 …

Posted: Wed Mar 02, 2005 10:04 pm
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... :(