0

I am trying to make a custom regex for a textarea field for a form. The regex only need to make sure that the characters < and > is not allowed and only prevent these characters so I can generate a error message for the users to see.

The regex in use at the moment is: ^((?![<>]).)*$ but it does not seem to allow any new lines.

I am using the site regex101 while trying to get to a solution and from what I can understand this regex seems to allow new lines.

Is there anything I'm missing regarding the regex itself or can it be something with sitecore and how it handles regex?

Other notes:

I've tried around with different modifiers, /m /r /s but I can't seem to figure out how they are working and how I should apply them to this regex.

Johannes B
  • 41
  • 7

0 Answers0