ClulessChris
IS-IT--Management
Hi,
I'm trying to write a regex pattern for my schema. I want to prohibit the use of certain characters ("&'#) & --
I have the following pattern that works to a point:
[a-zA-Z\s\d_\. !$%^*()_+={}|:;,?~/£@\\]*
I'm having trouble restricting the hyphen '-' to a single char as I need to exclude double hyphen '--'
I've tried a few things, such as
[a-zA-Z\s\d_\. !$%^*()_+={}|:;,?~/£@\\]*[-]?
but it's now driving me crazy. Any help would be most welcome.
I'm trying to write a regex pattern for my schema. I want to prohibit the use of certain characters ("&'#) & --
I have the following pattern that works to a point:
[a-zA-Z\s\d_\. !$%^*()_+={}|:;,?~/£@\\]*
I'm having trouble restricting the hyphen '-' to a single char as I need to exclude double hyphen '--'
I've tried a few things, such as
[a-zA-Z\s\d_\. !$%^*()_+={}|:;,?~/£@\\]*[-]?
but it's now driving me crazy. Any help would be most welcome.