tags would be within a validly formatted HTML document. This brings up a
question of the relative merits of the * and + modifiers when doing large
matches. I'll have to look in Mastering RegEx if there's any known speed or
overhead differences. I doubt it, but.... :)
_____
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 14, 2004 11:25 AM
To: CF-Talk
Subject: RE: Regular Expressions: Extract code between BODY tags
Actually this should be
rereplacenocase(string, '.*<body[^>]*>(.+)</body>.*', \1)
Pascal
> -----Original Message-----
> From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
> Sent: 14 September 2004 16:54
> To: CF-Talk
> Subject: [Spam?] RE: Regular Expressions: Extract code between BODY
tags
>
> rereplacenocase(string, '<body[^>]*>(.+)</body>', \1)
> Your looking for the body tag with anything in it, then everything
after
> that body tag that does not include the ending body tag. Using
REReplace
> is
> the most efficient here as your peeling off what you don't want (i.e.
> whats
> not body content)
>
>
>
> _____
>
> From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 14, 2004 10:48 AM
> To: CF-Talk
> Subject: Regular Expressions: Extract code between BODY tags
>
>
> All:
>
> I have a complete HTML file, beginning with doctype declaration and
ending
> with a closing HTML tag, from which I'd like to programmatically strip
> away
> everything but the code between (and not including) the BODY tags.
That
> is,
> only the code (including tags) between the BODY tags should remain.
Can
> anyone provide the RE to accomplish this?
>
> TIA
>
> --
> Mosh Teitelbaum
> evoch, LLC
> Tel: (301) 942-5378
> Fax: (301) 933-3651
> Email: [EMAIL PROTECTED]
> WWW: http://www.evoch.com/
> _____
>
>
>
>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

