I'm validating user input, but it fails because it checks for any character in the character set as well.
我验证用户输入,但它失败了,因为它检查字符集中的任何字符。
How to assure that I can accept URI like:
如何保证我可以接受URI,比如:
e/1test1
page1/2test2
p/3test3
pag/4test4
test/63tedddddst/test5
but not when 'page' exist as a first word followed by '/':
但当“page”作为第一个单词出现,后面跟着“/”时就不是这样了:
page/test7
The expression:
表达式:
^([^page].+?\/?)$
https://regex101.com/r/zP0tQ3/1
https://regex101.com/r/zP0tQ3/1