We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Syntax coloring program labels

Thread ID:

Created:

Updated:

Platform:

Replies:

45029 Jun 8,2006 02:00 PM Jun 13,2006 11:01 AM Windows Forms 4
loading
Tags: EditControl
Ed Kuzemchak - SDS Inc.
Asked On June 8, 2006 02:00 PM

I am trying to syntax color program labels, which for me are simply any alphanumeric followed by a '':'' character. The XML description that I wrote does not match the text properly: The problem appears to be the colon character. Simplifying the definition to try to just match "foo:" does not work. But, matching just a colon character does work. Is there something I am doing wrong? In addition, the regular expressions do not appear to handle beginning-of-line (^) correctly. For example "^foo" will match "foo" anywhere in the line. Is there a workaround for this? Best regards, Ed

Ed Kuzemchak - SDS Inc.
Replied On June 8, 2006 04:37 PM

(For some reason, the XML examples I pasted did not come thru - maybe they are hidden by the HTML page?) I am trying to syntax color program labels, which for me are simply any alphanumeric followed by a '''':'''' character. The XML description that I wrote does not match the text properly:

<\pre>

The problem appears to be the colon character. Simplifying the definition to try to just match "foo:" does not work.


<\pre>



But, matching just a colon character does work.


<\pre>



Is there something I am doing wrong?


In addition, the regular expressions do not appear to handle beginning-of-line (^) correctly. For example "^foo" will match "foo" anywhere in the line. Is there a workaround for this?

Best regards,
Ed
   

Ed Kuzemchak - SDS Inc.
Replied On June 8, 2006 04:40 PM

OK - it seems to not be possible to type XML in the Forum. Nice. Could someone suggest a lexem definition to match labels that end with a colon char. What I expected to work "^\s*w+:" does not for the reasons below.

Administrator [Syncfusion]
Replied On June 9, 2006 09:19 AM

Hi Ed, Our apologies for the inconvenience caused.I have attached a sample that illustrates how to apply syntax highlighting for labels that end with a colon character. We have considered adding support to highlight lexems if they only occur at the beginning of the lines and have logged a feature request# 524 on this.You could track the progress of this feature request at this link below : Feature Request #524 - Support to highlight lexems if they only occur at the beginning of the lines Let me know if this meets your requirements. Regards, Ebenezer.P

RegularExpression1.zip

Ed Kuzemchak - SDS Inc.
Replied On June 13, 2006 11:01 AM

Thanks! That worked for me. Looking forward to the additional capability of including begin/end line in the regular expression. But this will work for now. Ed >Hi Ed, > >Our apologies for the inconvenience caused.I have attached a sample that illustrates how to apply syntax highlighting for labels that end with a colon character. > >We have considered adding support to highlight lexems if they only occur at the beginning of the lines and have logged a feature request# 524 on this.You could track the progress of this feature request at this link below : > >Feature Request #524 - Support to highlight lexems if they only occur at the beginning of the lines > >Let me know if this meets your requirements. > >Regards, >Ebenezer.P > >

RegularExpression1.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;