Thursday, 19 May 2022

How to match hyphens with Regular Expression

 How to match hyphens with Regular Expression

  • [-] matches a hyphen.
  • [abc-] matches a, b, c or a hyphen.
  • [-abc] matches a, b, c or a hyphen.
  • [ab-d] matches a, b, c or d (only here the hyphen denotes a character rang

 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive