Wouldn't it be "faster" to use a Lower() on the string rather than
REFindNoCase?
I thought that doing a NoCase does the search twice, so on long strings,
it could be slower...
Just a thought
-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 11:02 AM
To: CF-Talk
Subject: RE: number of occurrences in a string.
I'm not a regex guru, but what about using the \b boundry:
<cfset s = "This is the beginning of the Beg. I don't beg for crap when
I begin.">
<cfset foo = reFindNoCase("\b(beg)\b",s,1,true)>
<cfdump var="#foo#">
This seems to work well. In a UDF you would just return the arrayLen of
foo.pos.
Does this seem right to others?
_____
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- RE: number of occurrences in a string. Bryan F. Hogan
- RE: number of occurrences in a string. Tim Blair
- RE: number of occurrences in a string. Pascal Peters
- RE: number of occurrences in a string. Tim Blair
- RE: number of occurrences in a string. Pascal Peters
- RE: number of occurrences in a string. Raymond Camden
- RE: number of occurrences in a string. Pascal Peters
- RE: number of occurrences in a string. Pascal Peters
- RE: number of occurrences in a string. Raymond Camden
- RE: number of occurrences in a string. Raymond Camden
- RE: number of occurrences in a string. Philip Arnold
- RE: number of occurrences in a string. Raymond Camden
- RE: number of occurrences in a string. Barney Boisvert
- RE: number of occurrences in a string. Pascal Peters