         ]
       }
       {
-        'begin': '(\\$)'
+        'begin': '\\$'
         'beginCaptures':
           '0':
             'name': 'punctuation.definition.string.begin.stata'
-        'end': '(?=\\"|\\s|\\n|/|,)'
+        'end': '(?=\\"|\\s|\\n|/|,|\\$)'
         'endCaptures':
           '1':
             'name': 'punctuation.definition.string.end.stata'

        'include': '#unicode-regex-character-class'
      }
      {
        # 'comment' 'NOTE: Error if I have \.+ No idea why but it works fine it seems with just \.'
        # Also extremely weird but if I have the previous 'comment' line uncommented, everything inside the regexm(, "...") goes white.
        'match': '.'

        'beginCaptures':
          '0':
            'name': 'punctuation.definition.string.begin.stata'
        'end': '\\}'
        'endCaptures':
          '0':
            'name': 'punctuation.definition.string.end.stata'
        'patterns': [
          {
