Skip to content

Instantly share code, notes, and snippets.

@kerryChen95
Created December 2, 2013 11:14
Show Gist options
  • Save kerryChen95/7748088 to your computer and use it in GitHub Desktop.
Save kerryChen95/7748088 to your computer and use it in GitHub Desktop.
RegExp for English & Chinese usual sentence. It was written when I change my fucking annotation style.
// RegExp for English & Chinese usual sentence, which is reuseable
[\s\w\。\,\、\`\:\~\`\!\@\#\$\%\^\&\*\(\)\-\_\+\=\{\}\[\]\|\;\:\"\'\<\>\,\.\/\?]*?\n
// Whole RegExp for change my fucking annotation style, which is:
// /**
// * balabala
// * foo
// **/
// search via it and replace with $1$3 **twice**, and than there is a new annotation style:
// /**
// balabala
// foo
// **/
^((\s\s\s\s)*)(?:\s{1}\*\s{1}?)([\s\w\。\,\、\`\:\~\`\!\@\#\$\%\^\&\*\(\)\-\_\+\=\{\}\[\]\|\;\:\"\'\<\>\,\.\/\?]*?\n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment