Waqleh
Waqleh

Reputation: 10161

javascript regular expretion issue with facebook links

i am trying to to the following

new RegExp(/(^(https:\/\/)((w{3}\.)?)facebook\.com\/(?:[^\s()\\\[\]{};:'",<>?«»“”‘’]){5,255}$)|(^$)/i).test('https://www.facebook.com/NocApps?ref=ts&fref=ts')

but this returns false

if i remove the "?" from "https://www.facebook.com/NocAppsref=ts&fref=ts" it returns true. why? what am i missing.

Upvotes: 0

Views: 89

Answers (1)

polybios
polybios

Reputation: 1159

You are excluding ? from possible characters here [^\s()\\\[\]{};:'",<>?«»“”‘’]

Upvotes: 1

Related Questions