Skip to content

Instantly share code, notes, and snippets.

@chmielot
Created October 11, 2012 11:51
Show Gist options
  • Save chmielot/3871837 to your computer and use it in GitHub Desktop.
Save chmielot/3871837 to your computer and use it in GitHub Desktop.
Crop text after 20 chars with regex
([^\s][\s\S]{0,20}(?!=[^\s]))([\s]|$)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment