andyMatthews.net

Regex - match a string that doesn't contain another string

User Greg Morphis asked a question today over on the House of Fusion mailing list.

I just ran into a problem with some old code one of team mates did. He used <cfqueryparams but did not specify a cfsqltype. We upgraded our DB from Oracle 9i to 10g and all of the sudden we're getting Error Executing Database Query errors. Logs show A nonnumeric character was found when expecting a numeric character. One of the queries had a date column and the cfqueryparam looked like "<cfqueryparam value="foo" /> no cfsqltype and according to the docs it's default is CF_SQL_CHAR. So I need to go through the 1321 <cfqueryparams and look for ones with no cf_sql_type. Is there a regex I can throw into Eclipse to help find these queries?

I tried a few things but couldn't get a good match so I asked about it on Twitter. A few minutes later Jason Dean, of 12 Robots fame, came back to me with a great answer that worked perfectly. Here's the test strings, and the regex he came up with. After that we'll dissect the regular expression

By the way...if you see any errors in this regex, or have a suggestion that's more elegant or would work better, feel free to post it.

Update: On a side note, Grant Skinner has an excellent regex tester on his website.

Chaussures Nike Pas Cher, Nike Air Force 1 Pas Cher, Nike Air VaporMax Pas Cher, Nike Air VaporMax Flyknit 3 Pas Cher, Nike Air VaporMax Plus Pas Cher, Nike Air VaporMax 360 Pas Cher, Nike Air VaporMax 2020 Pas Cher, Nike Air VaporMax 2021 Pas Cher, Nike Air VaporMax EVO Pas Cher, Nike Air Max Pas Cher, Nike Air Max 90 Pas Cher, Nike Air Max 95 Pas Cher, Nike Air Max 97 Pas Cher, Nike Air Max 2021 Pas Cher, Nike Air Max TN Pas Cher, Nike Air Max Plus Pas Cher, Nike Air Max Plus 3 Pas Cher | Zapatillas Nike Baratas, Nike Air Force 1 Baratas, Nike Air VaporMax Baratas, Nike Air VaporMax Flyknit 3 Baratas, Nike Air VaporMax Plus Baratas, Nike Air VaporMax 360 Baratas, Nike Air VaporMax 2020 Baratas, Nike Air VaporMax 2021 Baratas, Nike Air VaporMax EVO Baratas, Nike Air Max Plus Baratas, Nike Air Max Plus 3 Baratas, Nike Air Max 90 Baratas, Nike Air Max 97 Baratas, Nike Air Max 95 Baratas, Nike Air Max 1 Baratas