Skip to content

Instantly share code, notes, and snippets.

@lukeholder
Last active December 15, 2015 13:09
Show Gist options
  • Save lukeholder/5264877 to your computer and use it in GitHub Desktop.
Save lukeholder/5264877 to your computer and use it in GitHub Desktop.
reg prob
captionregex = Regexp.new('\[(\w*?)(.*?)\](.*?)\[\/\1\]')
body.gsub(captionregex, \3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment