Regex help


How may I regex that class.variable will have some special colors, so I’d want class to be named class, the . will have no name and ‘variable’ will be named variable.

I also want this to be able to continue untill the variable has been detected
For example


where class is named class
and . has no name
and variable is named variable

How would I do this syntax?

  'match': '\\bclass(?=\\.)'
  'name': 'class'
  'match': '(?<=\\.)variable\\b'
  'name': 'variable'
} should help.