How to match underscores in my variable definition regex?



I have this code block for matching variable definitions in shell script in my fork of the core language-shellscript package, language-unix-shell:

        'begin': '(?<![/$/[a-zA-Z0-9_]/|/\\=/\\//])([a-zA-Z0-9_-]+)(\\+=|=)'
            'name': ''
            'name': 'variable.definition.equal'
        'end':  ';|&|$|'
            'name': ''

the problem is that it fails to match underscores (_) in variable definitions so of this example variable definition:


only -DCMAKE is syntax-highlighted using the style. For some reason what comes after _ is not given the style. How do I change this code block in order to get the syntax-highlighting of shell variable definitions right?

Thanks for your time,