Reputation: 103
Can anyone help getting a piece of regex working in javascript please?
This is the regular expression:
storify.com\/*(?<code>[^"]*)
It works fine in C# but I can't get it working in js, I presume due to a delimiter issue but not sure which characters are causing the problem.
This is the js I'm trying but gives me and an "invalid quanitifier" error on the first line
var myregex = /storify.com\/*(?<code>[^"]*)/;
var storify = 'http://storify.com/DigitalFirst/ces-2013-five-things-you-missed-day-3';
var remoteid = storify.match(myregex);
console.log(remoteid);
Thanks in advance for anyone who can help get this working.
Upvotes: 0
Views: 141