Which version of Episerver are you using?
Where are you placing this text box?
Try using https://regex101.com/ to get an explanation of what your regex really does.
Then try this rexex, that I thew together quickly:
I have a text box. in that text box i want to allow letters , numbers and few symbols (.,').
i don't to allow any links in that text box.
i want regex to don't allow links like (HTTP,HTTP,WWW,ftp).
am using below regex. its working fine when text box starts with WWW. if the WWW word includes in middle of the text then it is not working.