Skip to content

Instantly share code, notes, and snippets.

@faryar76
Created January 9, 2019 16:39
Show Gist options
  • Save faryar76/ee5e9511f94f0df8dc9773cd1d0b4a79 to your computer and use it in GitHub Desktop.
Save faryar76/ee5e9511f94f0df8dc9773cd1d0b4a79 to your computer and use it in GitHub Desktop.
with this regex can get english chars from first of string
^[\s\w\d\x21-\x2f\x3a-\x40\x5b-\x60\x7b-\x7e]*
//teststringاین متن فارسی است
//output -> teststring
https://stackoverflow.com/questions/8961833/regular-expression-to-match-english-words-with-some-other-characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment