RegEx to replace text between two hash-symbols, between two tags, but keep everything else
问题 So I need to replace #var# and #var2# with <cfqueryparam value="#var#" /> and <cfqueryparam value="#var2#" /> . However, this should only happen when #var# is wrapped inside <cfquery></cfquery> . As an extra criteria, the cfquery-tag will contain text before and after the hash-symbols. This is an example: <cfquery datasource="#tablename#"> SELECT * FROM table WHERE name = #var#, somethingelse = #var2#; </cfquery> I need a regex that only matches 'test' when it's between two hash-symbols and