Regular Expressions

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; }