My friend, Mr. Steve Good, approached me about a problem he was having where he needed to add a namespace to an HTML tag at runtime. Essentially he was parsing some dynamic HTML and wished to inject an additional namespace into the HTML declaration. Regular expressions to the rescue! The first test I ran was [...]
Posts Tagged ‘Regex’
Adding Namespaces to HTML Tag Using Regular Expressions
Posted: 25th August 2010 by Adam Presley in ColdFusion, Development, RegexTags: ColdFusion, Development, Regex
Finding Specific Text in a String using ColdFusion and Java
Posted: 15th July 2009 by Adam Presley in ColdFusion, Development, RegexTags: ColdFusion, Development, Regex
A question was posted on the Dallas/Ft. Worth ColdFusion User Group today. I’m trying to parse a text file to find a particular string, then extract that string and approximately 100 characters past that. So I’ve cooked up a little code sample that uses the Java regular expressions classes. The ColdFusion regular expression methods are [...]
SQL Formatted Revisited
Posted: 8th April 2009 by Adam Presley in Development, RegexTags: Development, Regex
I posted an entry yesterday about using a regular expression to reformat SQL queries in code. After a bit more exploring and playing around in RegexBuddy (wonderful tool) I came up with a better regular expression to do the job. This version accounts for the last column much better than the previous expression I tried. [...]
Regular Expressions – Commas at the Beginning of Column Names
Posted: 6th April 2009 by Adam Presley in Development, RegexTags: programming, Regex
If you’ve worked with a lot of inline SQL like I have over the years you’ve probably discovered quickly that as you have to add more columns to your query, especially columns that are only added on a dynamic condition, it can be easy to mangle up your commas. Here’s an example of a common [...]

