I am trying to create a regex expression that does not allow some string to start or end with "-". I tryied this one so far, but it does not works on Safari.
.+(?
Any ideas on how to do that?
Thanks in advance
.+(?
I am trying to create a regex expression that does not allow some string to start or end with "-". I tryied this one so far, but it does not works on Safari.
.+(?
Any ideas on how to do that?
Thanks in advance
.+(?
Will this work?
^([^\-])(.*)([^\-])$
Or this version if you can also have 1 or 2 character values
^([^\-])(.*)([^\-])$|^(([^\-]){0,2})$