Skip to content

Instantly share code, notes, and snippets.

@danlamanna
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save danlamanna/be3ad17f72befe1b7b46 to your computer and use it in GitHub Desktop.

Select an option

Save danlamanna/be3ad17f72befe1b7b46 to your computer and use it in GitHub Desktop.
add_filter( '
;; with cursor directly after single quote:
(looking-back "add_\\(action\\|filter\\)([[:space:]]?+\\('\\|\"\\)") => t
(match-string 0 "add_\\(action\\|filter\\)([[:space:]]?+\\('\\|\"\\)") => "add_\\(ac" ;; expects whole string
(match-string 1 "add_\\(action\\|filter\\)([[:space:]]?+\\('\\|\"\\)") => nil ;; expects action or filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment