Uses a regular expression (RE) to search a string for a pattern, starting from a specified position. The search is case-sensitive.
It will return numeric if returnsubexpressions is false and a struct of arrays named "len", "match" and "pos" when returnsubexpressions is true.
reFind(reg_expression, string [, start] [, returnsubexpressions])
→ returns any
1falsetruefalseoneoneallThis example uses reFind to locate an integer in a string, and returns the position of the integer in the string.
reFind("[0-9]+", "test 123!")
Expected Result: 6
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.