ColdFusion MX Regex Syntax


Another of those things that seem so hard to find. Apparently CFMX uses the ORO libraries for the regular expression handling.


"CF MX RegExp engine is based on the ORO libraries"
Source: http://www.houseoffusion.com/cf_lists/messages.cfm/forumid:21/Threadid:55#264

If that is true, then here is a link to the ORO library home page:
http://jakarta.apache.org/oro/index.html

Get only numbers from a string with regex: tempstring = rereplace(tempstring, '[^0-9]+', '', 'all'); (source: http://www.houseoffusion.com/groups/regex/thread.cfm/threadid:51)
 

Allow a-z small caps, A-Z upper case, 0-9, and "-": [^a-zA-Z0-9-]

 

---

 

 

More examples:

Replace all characters in a string that aren’t numbers, letters, or underscores with an underscore:

https://www.oreilly.com/library/view/programming-coldfusion/1565926986/ch17s05.html

tags: cfml, coldfusion,
 

Related Scribbles:
  • Regex Examples and Tools
  • ColdFusion Notes


  • ID: 724
    Author:
    leonard
    Date Updated:
    2019-06-13 15:36:34
    Date Created:
    2005-12-20 10:55:42

    Edit

    Comments?
     >> Leonard Chan's Homepage  >> Scribble Web  >> ColdFusion MX Regex Syntax
    leonard.lotus-land.ca is hosted by Perceptus Solutions Inc.