Hi Eric,
Thanks for contacting Syncfusion support.
Query 1 : How to highlight IP address with specific color and how do I match a literal period in the regex as the usual escaped period does not match \. vs .
We have checked your requirement about highlighting IP address with some specific color and we have prepared sample for the same. In this sample we have used the given RegEx format in the BeginBlock of the Lexem and we have mentioned the same in Split collection, so that the given format will be considered as single text instead of separating special characters from given IP. Please find more information about Split in below link,
Code Example to highlight the IP address:
|
<lexems>
<lexem BeginBlock="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}" IsBeginRegex="true" IsContinueRegex="true" Type="IPFormat" />
</lexems>
<splits>
<split IsRegex="true">(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})</split>
</splits> |
Query 2 : it looks like I got the comment to work using the following
We have checked your requirement “Highlighting the entire text in the line as comment section”. You can use the same code(which was mentioned in your last update), to Highlight the Comment block. Also you can use below codes to highlight the comment section. We have used the same code in the attached sample. In this sample, we have mentioned the EndBlock and enable the properties IsComplex and OnlyLocalSublexems as true.
Code Example to highlight the comment block :
|
<lexem BeginBlock="!" Type="Comment" OnlyLocalSublexems="true" EndBlock="\n" IsComplex="true"/> |
If we have misunderstood your query, please get back to us with more details. This would help us to provide solution at earliest.
Regards,
Durga S.