I have this string
"<p></p>" fixed
Is it possible to have a regex that would omit the 7 characters and check if there are at least 3 characters in between?
"<p></p>" = false
"<p> </p>" = false
"<p>Hello</p>" = true
"<p>Hello </p>" = true
Further details:-
By default, my editor has the p tags. Therefore my validator is always returning editor string value is not empty. So I want to add the regex expression in the matches fx.
string().required().matches()
>Solution :
I think this is what you look for:
^<p>[\S]{3,}<\/p>$
if whitespaces are ok for you as well it is this one:
^<p>.{3,}<\/p>$