Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!28g2000hsw.googlegroups.com!not-for-mail
From: Arthur G <gorramfreak@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matching Character Phrases...
Date: Fri, 22 Feb 2008 18:07:38 -0800 (PST)
Organization: http://groups.google.com
Lines: 8
Message-ID: <c2272fc9-c116-49da-a80e-aa35487591df@28g2000hsw.googlegroups.com>
References: <fpkn42$3cg$1@fred.mathworks.com> <fpnttj$pk1$1@fred.mathworks.com>
NNTP-Posting-Host: 24.128.137.91
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1203732459 31418 127.0.0.1 (23 Feb 2008 02:07:39 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 23 Feb 2008 02:07:39 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 28g2000hsw.googlegroups.com; posting-host=24.128.137.91; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Opera/9.50 (Macintosh; Intel Mac OS X; U; 
Xref: news.mathworks.com comp.soft-sys.matlab:453270



On Feb 22, 8:46=A0pm, "Jason Breslau" <tendiamo...@mathworks.com> wrote:
> This seems like a good time to use dynamic regular expressions.
<snip>

Interesting... But the regexp engine will still end up scanning
(albeit smaller and smaller portions of) the string repeatedly. As
long as you have the ability to hash (at most) numel(text) "words",
then you only have to scan the string once...