Skip to content

Instantly share code, notes, and snippets.

@JestVA
Created September 4, 2019 21:59
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 JestVA/c0944c2ea66e812e8e57796b6c9df564 to your computer and use it in GitHub Desktop.
Save JestVA/c0944c2ea66e812e8e57796b6c9df564 to your computer and use it in GitHub Desktop.
/,.+$/ // This expression matches anything that is after a , if in one line
for a string of this type:
"Friday May 2, 9am"
"jbjbkjbkjb"if
/,.+$/ expression would only match [ , 9am" ] if m flag is enabled i.e. /,.+$/m
. // matches any character except line breaks
+ // match 1 or more of preceding token
$ // matches the end of the string, or the end of a line if multiline flag (m) is enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment