Skip to content

Instantly share code, notes, and snippets.

@bean5
Created December 20, 2013 15:58
Show Gist options
  • Save bean5/8056788 to your computer and use it in GitHub Desktop.
Save bean5/8056788 to your computer and use it in GitHub Desktop.
Find coldfusion functions that do not have either returntype, name, output, or access specified.
//doesn't specify access
<cffunction\s*(((name)|(hint)(output)|(returntype)|)\s*=\s*(['"]([a-z ]*)['"])\s*(access\s*(=\s*['"][a-z]?['"])?)?)*>
//doesn't specify name
<cffunction\s*(((access)|(hint)|(output)|(returntype))\s*=\s*(['"]([a-z ]*)['"])\s*(name\s*(=\s*['"][a-z]?['"])?)?)*>
//doesn't specify hint
<cffunction\s*(((access)|(name)|(output)|(returntype))\s*=\s*(['"]([a-z ]*)['"])\s*(hint\s*(=\s*['"][a-z]?['"])?)?)*>
//doesn't specify output
<cffunction\s*(((access)|(name)|(hint)|(returntype))\s*=\s*(['"]([a-z ]*)['"])\s*(output\s*(=\s*['"][a-z]?['"])?)?)*>
//doesn't specify returntype
<cffunction\s*(((access)|(name)|(hint)|(output))\s*=\s*(['"]([a-z ]*)['"])\s*(returntype\s*(=\s*['"][a-z]?['"])?)?)*>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment