Answer the question
In order to leave comments, you need to log in
Regexp for BEM?
There is a regular expression /\b([a-z\d-]+(?:__[a-z\d-]+)*)\b/ig
that finds blocks and elements without modifiers, but if the name is present -
, then everything breaks. (example: regexr.com/3cr4d , correct behavior below)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question