capturing ? for a start tag

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by smallguy
Avatar
I have the following as a test:

<!-- PHP Code Block -->
<State Key="PHPDirectiveCodeState" Filename="ActiproSoftware.VBScript.xml" ChildLanguageBackColor="WhiteSmoke">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" Token="PHPDirectiveStartToken" Style="ASPDelimiterStyle" PatternValue="<\?"/>
<ExplicitPatternGroup Type="EndScope" Token="PHPDirectiveEndToken" Style="ASPDelimiterStyle" PatternValue="\?>"/>
</Scope>
</Scopes>
</State>

but the ? isn't being found. I tried it without the \ and also inside [], but still no luck. Any ideas how to solve this?

Thanks in advance

Comments (1)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Remember that explicit pattern groups don't use regular expressions. So to look for "?" you would simply use a PatternValue of "?" for an explicit pattern group. If it is not being recognized then load it up in our sample application. Then move the caret to the point where it should be matched to text. Look at the status bar and it tells you what token it matched. It might be matching something else instead but that will tell you.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.