   'unicode-regex-internals':
     'patterns': [
       {
-        'match': '\\\\[bBAZzG]|\\^|\\$'
+        'match': '\\\\[bBAZzG]|\\^'
+        'name': 'keyword.control.anchor.stata'
+      }
+      {
+        'match': '\\$(?![a-zA-Z\\{])'
         'name': 'keyword.control.anchor.stata'
       }
       {

    'patterns': [
      # The following match the insides of a regular expression
      {
        'match': '\\^|\\$'
        'name': 'keyword.control.anchor.stata'
      }
      {

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