FANDOM


Intro text about regular expressions goes here

How to learn goes here

Examples go here

Harry's all purpose function:

function extractFrom(data, prefix, suffix) {
  var item = data.match(esc(prefix) + '([.\s\S]*?)' + esc(suffix));
  if (item != null) return item[1];
  return "";
}

function esc(s) {
  var alfa = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  var t = "";
  for (i = 0; i < s.length; i++)  {
    if (alfa.indexOf(s[i]) >= 0) { t += s[i];}
    else if ((" " <= s[i]) && (s[i] < String.fromCharCode(127))) { t += "\" + s[i]; }
    else t += s[i];
  }
  return t;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.