Skip to content

Instantly share code, notes, and snippets.

@mgan59
Created May 24, 2011 19:08
Show Gist options
  • Save mgan59/989420 to your computer and use it in GitHub Desktop.
Save mgan59/989420 to your computer and use it in GitHub Desktop.
regex to breakup a mixed object filter, used in a sammyjs script
// best if ran from a console debugger in firefox(firebug) / chrome(jsdebugger)
var str = 'market_cap;min=340,max=400,pe_ratio;min=4,max=23,div_yield;min=3.00,max=6.00';
str.match(/[a-z_]+;([a-z0-9=.]+,?){2}/g);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment