My php script should validiate address of websites, that user type into the form.
Adress should look like this:
http://example.com/example/{some numbers}/
or
http://example.com/example/{some numbers}
And I have think about something like this, but it doesn’t work:
/^(http:\/\/)?example\.com\/example\/\d{1}(\/?)$/
Can you show me where I’m wrong?
\d{1}means: ONLY one digit. Maybe you want to do\d+(at least one digit)