How do regularities match-sharpffffff,-sharp000000, without recognizing-sharpfff000

like matching the color values of-sharp000000.-sharpffffff, and not matching similar to-sharpfff000,-sharpabc123,-sharpa1b2c3.

I wrote one myself, and I feel a little verbose:

/-sharp(1{6}|2{6}|3{6}|4{6}|5{6}|6{6}|7{6}|8{6}|9{6}|0{6}|a{6}|b{6}|c{6}|d{6}|e{6}|f{6})/ig
Mar.10,2021

use metacharacters: \ 1 ~\ 9

/^-sharp([a-f\d])\1{5}$/gi

  

-sharp ([0-9a-f])\ 1 {5}

Menu