Chris,

 

Thanks this worked perfectly.

 

Bryan

 

________________________________

From: Chris Porter [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 12:18 PM
To: [email protected]; Bryan Hogan
Subject: Re: Extracting inner text from html code

 

i really wish claude would stop promoting his code, on the regex list,
and instead actually try to answer questions..

to answer your question, use this regex

<span.*?>(.*?)</span>

it will lazy (non-greedy) match everything between span tags. you can
make it more specific by adding things inside the opening span tag, for
example:

<span id="123asdf".*?>(.*?)</span>

or if you are like me and dont standardize your tags... 

 <span.*?id=["']asdf123["'].*?>(.*?)</span>

Hope this helps!
-Chris



On Thu, Jul 3, 2008 at 2:23 PM, Claude Schneegans
<[EMAIL PROTECTED]> wrote:

 >>I'm trying to extract the inner text of span elements.

See CF_REextract:
http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm

You can test it on line here:
http://www.contentbox.com/claude/customtags/REextract/testingREextract.c
fm
- Enter <span[^>]*> in RE1
- Enter </span in RE2
- Select OUTPUTMODE = List
- Enter <span id="lblOrganizationName">I want this text</span> in Sample
text
- Click Test

--
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1148
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21

Reply via email to