TeraTech

The ColdFusion Experts: Develop | Secure | Optimize

  • Services
  • About
  • CF Alive
  • Blog
  • Podcast
  • Contact

  • Services
  • About
  • CF Alive
  • Blog
  • Podcast
  • Contact

Regular expression to search for FORM and CFFORM tags

February 23, 2007 By Michaela Light Leave a Comment

Recently I needed to go through a large body of code, checking all forms to be sure they met certain requirements. There was a lot of old ColdFusion code, written by many different people over a period of years. I didn't have one single string to search on, and wanted to find them all in one search.

Solution: I wrote a regular expression that allowed me to search for all <form> or <cfform> tags, regardless of case, using my favorite extended search utility, Homesite's Extended Find.

It's a fairly simple regular expression, but it was a big deal for me because (1) it worked! and (2) I figured out how to write it, so now I know I can write another one when I need it. Here it is:

[<]([cC][fF])?[fF][oO][rR][mM][[:space:]]

For those not familiar with searching by regular expressions in Homesite, it's the same as a normal Extended Find, but you check the box for Regular Expression so it treats your search text as a pattern, not a literal.

If anyone knows how to make the same search work in Dreamweaver or in CFEclipse, would you please post a comment here for everyone? It may be due to different RegEx syntax or other issues, but I'm not sure how to do this outside of HomeSite. Awaiting your reply ....

Related Posts

  • 4 Best strategies to avoid mistakes in your ColdFusion projects pt. 24 Best strategies to avoid mistakes in your ColdFusion projects pt. 2
  • Better Time and Number Formats with ColdFusionBetter Time and Number Formats with ColdFusion
  • A powerful strategy to help avoid delays in your ColdFusion projectA powerful strategy to help avoid delays in your ColdFusion project
  • 024 CFML Debugging Jedi Tricks and Templates, with Gert Franz024 CFML Debugging Jedi Tricks and Templates, with Gert Franz
  • 071 ContentBox in the Cloud (Docker Magic) with Gavin Pickin071 ContentBox in the Cloud (Docker Magic) with Gavin Pickin
  • 017 Managing an international team, Git, CFML, Node, Joomla, Headaches and Heartaches, with Scott Coldwell – Transcript017 Managing an international team, Git, CFML, Node, Joomla, Headaches and Heartaches, with Scott Coldwell – Transcript
  • Facebook
  • Twitter
  • LinkedIn

Filed Under: Tips

← Previous Post Mindmapping for better programs
Next Post → TeraTech wins better consulting award from CFDJ magazine fifth year in a row

CF Alive Best Practices Checklist

 

Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.

Recent Posts

  • 4 Reasons Why Your ColdFusion Web Apps Are Suffering (And How To Avoid It)
  • Google Down – An Unprecedented Event (Save Your Data Fast!)
  • 107 ColdFusion 2021 Revealing Details on How it was Created with Rakshith Naresh
  • Into The Box LatAm 2020 Virtual Conference – Free to Register!
  • Slow ColdFusion Applications May Ruin Your Business (3 Steps to Prevent It)

Categories

  • ActionScript
  • Adobe CF Summit
  • Adobe CF Summit East
  • Adobe CF Summit East 2018
  • Adobe ColdFusion 11
  • Adobe ColdFusion 2020 Beta
  • Adobe ColdFusion 2021
  • Adobe ColdFusion Project Stratus
  • Adobe ColdFusion Security
  • AIR
  • Ajax
  • AngularJS
  • Announcement
  • API
  • Apollo
  • Auto Security Lockdown
  • AWS
  • C#
  • Certification
  • CF Alive
  • CF Alive Book
  • CF Alive Podcast
  • CF Camp
  • CF Developer week
  • CF Maintenance
  • CF Summit India
  • CF Tags
  • CF Training
  • CF Vs. Other Languages
  • CFEclipse
  • CFML
  • CFML Open- Source
  • CFObjective
  • cfquery
  • CFSummit
  • CFUnited
  • China Chopper
  • CIO
  • Classes
  • Client Highlights
  • ColdBox
  • ColdFusion
  • ColdFusion 2018
  • ColdFusion 2020
  • ColdFusion 2021
  • ColdFusion 9
  • ColdFusion community
  • ColdFusion Conference
  • ColdFusion Consulting
  • ColdFusion Developer
  • ColdFusion Development
  • ColdFusion Hosting
  • ColdFusion Security
  • ColdFusion Webinar
  • CommandBox
  • Conference
  • Cool Stuff
  • Culture
  • Cybercrime
  • Database
  • Development Approach
  • DevOps
  • Docker
  • Fixinator
  • Flex
  • Frameworks
  • Fusebox
  • FusionReactor
  • Futurology
  • Garbage Collector
  • Google Down
  • Into The Box Latam
  • IntoTheBox Conference
  • Java
  • JavaScript
  • JVM
  • Learn ColdFusion
  • Legacy Code
  • Load Testing
  • Lucee
  • Management
  • MAX
  • MDCFUG Lunch
  • Microsoft Azure
  • Mindmapping
  • MockBox
  • Modernize ColdFusion
  • Monitoring
  • Muracon
  • NCDevCon
  • New Intern
  • News
  • Node.js
  • Open- Source
  • ORM
  • Ortus Developer Week
  • Ortus Roadshow
  • Performance
  • Performance Tuning
  • PHP
  • Productivity
  • Programming Languages
  • Project planning
  • Query of Queries
  • Roadmap
  • Scalability
  • Security
  • Server Software
  • Server Tuning
  • Social Media
  • Spiral Web
  • SQL
  • Success Story
  • Survey
  • Technology
  • TestBox
  • Tips
  • Transcript
  • Trapeze Development
  • Uncategorized
  • Web 2.0
  • Web Application
  • Web Server
  • Webinar
  • Webmail
  • What is ColdFusion?
  • Whole Brain Development
  • Women in Tech
  • Work From Home

Recent Comments

  • Michaela Light on A Comprehensive Guide to Running a Successful CFML Project
  • Michaela Light on Is Lucee CFML now better than Adobe ColdFusion?
  • Michaela Light on Introducing Swansea Jack (Lucee CFML 6 announced)
  • Michaela Light on 082 ColdFusion and the Blockchain Revolution with Mike Brunt
  • Michaela Light on 082 ColdFusion and the Blockchain Revolution with Mike Brunt
  • Home
  • Services
  • About Us
  • CF Alive
    • CF Alive Book
    • CF Alive Inner Circle
    • CF Alive full resources cheatsheet
  • Blog
  • Podcast
    • Podcast Guest schedule
  • Contact
  • Sitemap

The ColdFusion Experts:
Develop, Secure, Optimize

TeraTech Inc
451 Hungerford Drive Suite 119
Rockville, MD 20850

Tel : +1 (301) 424 3903
Fax: +1 (301) 762 8185

Follow us on Facebook Follow us on LinkedIn Follow us on Twitter Follow us on Pinterest Follow us on YouTube

Copyright © 1998–2021 TeraTech Inc. All rights Reserved.