I want to do the regexpr pattern matching and I couldn't. Please help.
I want to evaluate the value that is going to be inserted in DB. I want to perform a check as below.
Only four special characters and alphabeticals are allowed. other special characters are not allowed.
Four characters are .
dot, -
Hyphen '
apostrophe and space
My value will have meet below condition.
- It contains only alphabets.
- It contains combination of alphabets and above special characters.
- it contains only all spaces.
- Except for spaces it should not be simply special characters as
......
,----------
,''''''''
.
For example these are valid:
ORACLE
ORA..C L--E
''..O
O--...'''
and these are invalid:
........
''''''''''
--------
ORACLE$
ORACL#E