It might be good for you city folks to travel out west for a change! :-)

I can organise the venue.
Dawesi

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robin
Hilliard
Sent: Friday, 27 August 2004 9:13 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: OT: regexp find and replace

Now, if you had gone to Sydney CFUG, you would have done this:

find:           jack([A-Z])
replace:        steve\1

(To paraphrase: find jack followed by a capital letter, and replace with 
steve and the same capital letter.)

Well you may have done this, although the eight or so who braved the eve 
of the coldest, wettest day this year to attend are on the list and 
didn't respond, which probably means they were so stuffed with pizza and 
beer for 30 that they couldn't concentrate.

Here's the <a> tags RE:

<a[^>]*>([^<]*)</a>

Thats "<a" followed by 0 or more non-">" characters, followed by ">", 
followed by 0 or more non-"<" characters we want to remember (the 
brackets) followed by "</a>".  Only works if there aren't any tags 
inside the <a>s.

Robin
http://www.rocketboots.com.au

Tim Rox wrote:
> Hi there,
> 
> Was just using cfstudio to run a global find and replace on some code.
> 
> I realised that i often find myself wondering if i can use regular
> expressions in the following way:
> 
> I want to find all instances of the word "jack" that are instantly
followed
> by an uppercase letter. eg. jackMAGGS or jackJILL.
> 
> BUT here the perplexing bit: i don't actually want to return anything but
> the word "jack" in the matches. (this is cos i actually want to replace
> "jack" with "steve" in these cases - ie so it becomes steveMAGGS or
> steveJILL).
> 
> The dilemma would apply if say, i wanted to find all the content that was
> between <a> tags in my code, but i didn't want to return the <a></a> tags
as
> a part of the matches.
> 
> I'm sure there's an easy answer. Perhaps i should have gone to the sydney
> CFUG last week? humble me.
> 
> Tim.

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to