I'm building a form in which users enter personal information (e.g Names) into text fields. I want to prevent users from being able to enter urls into the name field.
How do I write a regex to reject all urls but allow other words?
I have a regex for matching urls
/([w_-]+(?:(?:.[w_-]+)+))([w.,@?^=%&:/~+#-]*[w@?^=%&/~+#-])?/g
But am not sure how to match everything but this.
Thanks!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…