[nzlug] A little help with some find and replace?
Philip Murray
pmurray at nevada.net.nz
Fri Mar 28 09:51:12 NZST 2008
On 28/03/2008, at 10:41 AM, Simon wrote:
> Hi There,
>
> Just wondering if someone that is much better than me at regular
> expressions could give me a bit of a hand here?
>
> We have some websites (moving from Windows to Linux hosting platform)
> that have CAPITOL letters in the code (god forbid!) that need to be
> replaced. A possible line that needs to be changed is...
>
> [ListFiles ../Website/Orders/[current]/][hideif [filename]^icon]
>
> which needs to be changed to:
>
> [ListFiles ../website/orders/[current]/][hideif [filename]^icon]
s/\[(\w+) (.*)\]/[\1 \L\2\E]/g
Cheers
More information about the NZLUG
mailing list