- cfregex/src/functions/RegexMatch.cfm
- 969 B
- 11
1<cffunction name="RegexMatch" returntype="Array" output="false" >
2 <cfargument name="Pattern" type="String" required=true />
3 <cfargument name="Text" type="String" required=true />
4 <cfargument name="Start" type="Numeric" optional />
5 <cfargument name="Limit" type="Numeric" default=0 />
6 <cfargument name="ReturnType" type="String" default="match" hint="match|groups|namedgroups|full" />
7 <cfargument name="GroupNames" type="any" default="" hint="Required if returnType=NamedGroup." />
8 <cfargument name="Callback" type="any" optional hint="Function called to determine if a match is included in results." />
9 <cfargument name="CallbackData" type="Struct" optional hint="Extra data which is passed in to callback function." />
10 <cfargument name="Flags" type="String" optional />
11 <cfreturn new Regex(ArgumentCollection=Arguments,FuncName="match").match(ArgumentCollection=Arguments) />
12</cffunction>