0

Here is what I have got so far:

var module = 'Tiles';
var data = "/*-Tiles-*/ hello world /*-End-Tiles-*/ jhjhhdhdhshd shgsjs";
var pattern = '/\/\*(-'+ module +'-)\*\/([\s\S]*)\/\*(-End-'+ module +'-)\*\//g';

console.log(pattern);
var cssGet = pattern.exec(data);
console.log(cssGet[0]);

http://jsfiddle.net/a3e5hsLf/46/

However when I try to add a variable inside the expression. I Receive an error saying that Uncaught TypeError: undefined is not a function on (var cssGet = pattern.exec(data);).

Any help would be great

Thanks

themaster
  • 345
  • 6
  • 15

0 Answers0