1

Can any body suggest me a regex for non consecutive hyphen in the middle of a string?

Example

Should work for:

  • a
  • bbb
  • jsdhj-jsdjk
  • aaaa-sjjks-askdh-kshskah

Should not work for:

  • -a
  • ddd-
  • bbb--bb
  • hah-hhh--hjh
Alan Moore
  • 73,866
  • 12
  • 100
  • 156

0 Answers0