Newsgroups: comp.lang.tcl
From: "Donal K. Fellows" <donal.k.fell...@manchester.ac.uk>
Date: Tue, 17 May 2005 11:54:55 +0100
Local: Tues, May 17 2005 6:54 am
Subject: Re: regexp: parsing HTML tokens
You're probably after this:
regexp -nocase {<%@\s*page\s*((?:(?!%>).)*)%>} $string \ How does it work? Simple. Firstly, none of <%@> are special chars to RE Looking at that in detail, we see this in expanded form ( # Stash this sub-RE in a variable The key to doing sane parsing is often the negative lookahead assertion. Donal. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||