\b only on cfmx.
As I said before, the array created will give you the number of subexpressions (2: the entire regexp and the subexpr (beg)) of the first match. In cf you need a loop. Try putting 3 beg's in your string.


Pascal

-----Oorspronkelijk bericht-----
Van: Raymond Camden [mailto:[EMAIL PROTECTED]
Verzonden: vr 17/10/2003 17:01
Aan: CF-Talk
CC:
Onderwerp: 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]

Reply via email to