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. Robyn Follen
- RE: number of occurrences in a string. Raymond Camden
- 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