I'm trying to regex for strings contained in curly single quote marks (‘’), but for some reason, regex fails meHere's the entirety of my code after the require partsfs.readFile(process.argv[2],"utf8",function(err,data) { if(err) throw err; var matches = data.match(/‘(.+)’/g); console.log(matches); }) But for some reason, matches always comes up null.The annoying thing is, I could use that same regex on a hard-coded string and it works like a dream, but not with read files.
Submitted July 13, 2017 at 04:42AM by DoomTay
No comments:
Post a Comment