(?<!\d)([0-9]{5}-[0-9]{4}-[0-9]{2})(?!\d)
- ?> lookbehind
- ?<! negative lookbehind
- \d digit only
- ? lookahead
- ?! negative lookahead
- [0-9]{5}-[0-9]{4}-[0-9]{2} a specific pattern #####-####-##
For a code-highlighted view take a peek at this RegExr
(?<!\d)([0-9]{5}-[0-9]{4}-[0-9]{2})(?!\d)
For a code-highlighted view take a peek at this RegExr