Posted 16 years ago
by Krispy
![Avatar](https://secure.gravatar.com/avatar/bcf10f3896be6888c69d544fd2d02c88.jpg?s=64&d=identicon&r=g)
Hi guys. The following xml code demonstrates how to toggle StringState using a single quotation mark.
How would I alter this code to implement a double quotation mark as toggling the StringState?
I have tried the following, but it does not appear to like the escape '\' character.Thanks in advance.
<!-- Strings -->
<State Key="StringState" TokenKey="StringDefaultToken" Style="StringDefaultStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" TokenKey="StringStartToken" Style="StringDelimiterStyle" PatternValue="'" />
<ExplicitPatternGroup Type="EndScope" TokenKey="StringEndToken" Style="StringDelimiterStyle" PatternValue="'" />
</Scope>
</Scopes>
<!-- Patterns Groups -->
<PatternGroups>
<RegexPatternGroup TokenKey="StringDefaultToken" PatternValue="[^']+" />
</PatternGroups>
</State>
I have tried the following, but it does not appear to like the escape '\' character.
<RegexPatternGroup TokenKey="StringDefaultToken" PatternValue="[^\"]+" />