I'm having a hard time getting Lexems to work with Regular Expressions.
I am trying to color code a formula. I need to be able to color code tokens even if they aren't surrounded by a blank space.
In the following Formula, How do I write the lexem to set the color of the tokens Inv StartToEcl and Prior?
if ( CurrentDate = CaseStart,
Abandonment[Inv,StartToECL],
AbdnCurrentDol[Prior]
)
I'm able to color CurrentDate, as it has white space on either side of it. CaseStart, isn't found though.
if I use \W or \w or \b, I get the entire line color coded. I only want the token itself colored. How can I accomplish this?
lx.Add(new Lexem
{
StartText = @"\WPrior\W",
IsRegex = true,
ContainsEndText = false,
IsMultiline = false,
LexemType = EditTokenType.Keyword,
FormatName = "KeywordFormat"
});