I'm using ReplaceRegExp to do some file mods and it's just too cool,
except I can't figure out to have it re-evaluate a line in a file after
it's already been evaluated.
For example...
I have a line in my file like this.
symbol Fred%20Barney%20Wilma%20;
So, I want to replace the %20 string with a space, but only in the
instance where the line starts with "symbol"
I have this...
<replaceregexp flags="m" byline="false">
<regexp pattern="(^symbol.*?)%20(.*?)"/>
<substitution expression="\1 \2"/>
<fileset ...>
...
</fileset>
</replaceregexp>
But the problem is that this only replaces the first found occurrence,
which would turn the above line into
symbol Fred Barney%20Wilma%20;
Using flags=g doesn't seem to help me, nor does any other combination I
tried. I could add a for loop and just run this task a bunch of times,
but there is no theoretical limit to how many %20's can be in this line,
and I hate to loop 5000 times (for example) when the the most %20's in
any file is 45.
Any ideas?
Thanks,
-matt
[EMAIL PROTECTED]
> -----Original Message-----
> From: Matt Harp [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 21, 2004 1:05 PM
> To: [EMAIL PROTECTED]
> Subject: Moving files based on relative directory?
>
> I'm trying to take files and just move them up one directory
> level from where they are.
>
> I've been surfing the list archives and can't seem to find
> anything on this.
>
>
> Any help would be much appreciated,
>
> -matt
> [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]