Here's a string that I may have:
(MyStringIsOneWholeWord *)
I have used the following javascript regular expression to get the text after the bracket if it starts with My
.
/(^|\s|\()+My(\w+)/g,
The problem with this is that it includes the first bracket in the result, as that it is the letter/character that found it.
How would I get rid of the bracket in the result?
EDIT
For more information, I am editing the C Language
javascript file of the SHJS syntax highlighter.
Here's all the relevant code for this question:
[
/(^|\s|\()+My(\w+)/g,
'sh_keyword',
-1
]