Hey, how do I match the url that starts with digits which are followed by “?fmt=json”, like 1234?fmt=json return true but my another wep handler which handles the urls that are all digits like 1234 return false? I have tried \d+(?!\?fmt=json) which is supposed match the url where the digits are not followed by “?fmt=json”, but it doesnt work. any helps? thank you
Share
This regular expression only matches when the fmt=json suffix is there and will “return false” if only numbers:
Like
See here in a regex tester