0
Dear, I would like to use the following example (https://www.regextester.com/96504) that marks any link typed, and place in a textarea of my website to mark and warn that links are not allowed. I tested with required Pattern and I couldn’t. I also did the following example but it didn’t work in the textarea:
function isUrl(s) {
var regexp = (?:(?:https?|ftp):\/\/|\b(?:[a-z\d]+\.))(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))?
return regexp.test(s);
}
I’ve done several other examples but so far I haven’t been able to. Someone could give me a little help to get started. Before anyone else Egative me, I made many examples, it’s been several days since I’m researching about it, and as I can’t put all my tests here so I went straight to the first question and I was negative. Thank you
you want to detect or mark?
– Leonardo Bonetti
For what I researched here you can not do this directly in Textarea... will have to develop some other solution, because within Textarea is only accepted plain text.
– Leonardo Bonetti
Hello Leonardo, I just want to mark for the user to know that he is typing something invalid in the textarea field.
– Junior1967