Hello,
I have been trying to validate a URL for a certain keyword matches like -
www.sample.com/API/
www.example.com/API/
basically, I need to check two things, it should start with www. and have an /api/ section
The regex is working fine when I check with regexr but I am getting errors of -
Your regular expression can take too much time to complete, please use another one.
Could you please verify this -
/(?:http(s)?://)?[\w.-]+(?:.[\w.-]+)+[/]API/g
and suggest me the right regex.