Skip to content

Instantly share code, notes, and snippets.

@Pum-purum
Created October 23, 2017 12:21
Show Gist options
  • Save Pum-purum/6a7cb5bf68db0fa7c9180ce45caf9f16 to your computer and use it in GitHub Desktop.
Save Pum-purum/6a7cb5bf68db0fa7c9180ce45caf9f16 to your computer and use it in GitHub Desktop.
JS поиск всех подстрок в строке по регулярному выражению
var identifier;
identifier = $("[data-onevalue=" + this.offers[index].TREE.PROP_35 + "]");
identifier = identifier[0].innerText;
var regexp = /[0-9]{2,}/g;
regexp.lastIndex = 1;
var myRe = identifier.match(regexp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment