Skip to content

Instantly share code, notes, and snippets.

@swarut
Created November 1, 2012 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swarut/3993120 to your computer and use it in GitHub Desktop.
Save swarut/3993120 to your computer and use it in GitHub Desktop.
Ruby : Lookahead Regex #ruby #regex
at_prefixed_chunks = text.split(/(?<=\s)@/).reject(&:blank?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment