Adobe CQ5 dialog editor, regex property:
I am regex challenged so forgive me, but it seems a simple task and I just can't seem to find the right fit elsewhere on the internet. Every suggestion that looks right just doesn't seem to work in adobe's regex field.
I want the content admin to supply a relative URL to a "thank you" page. I don't need anything super fancy, I simply want to reject the admin's input if "http" or ".com" is found anywhere within the text supplied by the admin.
Examples for admin supplied input:
URL REGEX VALIDATES INPUT AS SUCCESS?
http://www.domain.com/questions No. string has both "http" and ".com"
https://www.domain.com/mail No. string has both "http" and ".com"
https://www.domain.net No. string has "http"
oopshttp://www.domain.net No. string has "http"
www.domain.com/mail No. string has ".com"
/subdomain/thankyou.html YES! string has neither "http" or ".com"
Ideally, the rejection of "http" and ".com" would supplement what I currently have: Which is the string must start with a forward slash "/" and end in ".html" which is:
/^\/.+?\.html$/
Any help is appreciated, thank You in advance
http|\.com
should work. – user557597/^\/.+?\.html$/
is not actually a valid regex. That regex looks for a slash.BOL.any chars,dot,html,EOS,slash. Its impossible for that to match anything. When you post regex's you should post ones that actuall work. – user557597