I got field values like this
computer-123-553
computer
compputer-233
computer-123-123
computer-900
How to get values that have no hyphen or digit (expect computer)
How to get values that have only one hyphen (expect computer- or computer-13254234)
How to get values that have two hyphens (expect computer- – or computer-23-123)
How to get values that have one hyphen and at least 1 digit (expect computer-3 or computer-312)
how to get values that have one hyphen and 3 digits (expect computer-312)
how to get values that have two hyphen and at least 1 digit (expect computer-3- or computer-331-333)
how to get values that have two hyphen and 6 digits (expect computer-123-555)
The following regex matches strings that do not have any
-in them:Explanation:
Similarly the following regex matches strings that have exactly one
-in them: