fork download
  1. var re=/\b.*?(left:\s*-?\d+\.?\d*px;)/igm;
  2.  
  3. function matchIt(str) {
  4. repl = str.replace(re, function($0, $1) {
  5. return $0 == $1? $0 : '';
  6. });
  7. return repl !== ""? true : false;
  8. }
  9.  
  10. print(matchIt('margin-left:100px;')); // false
  11. print(matchIt('left:100px;')); // true
Success #stdin #stdout 0.38s 381888KB
stdin
Standard input is empty
stdout
false
true