Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9104
    shx
    Participant

    can a line comment be a regex expression.

    the language i am working in uses a period as a comment but only if there is nothing before it on the line except for spaces.

    Thanks

    Steven

    #9105
    Yutaka Emura
    Keymaster

    Hi Steven,

    No, but you can use Highlight (1) tab of configuration properties, and check “Highlight Right Side” or “Highlight Right All” to show the similar effect.

    Thank you,

    #9107
    CrashNBurn
    Member

    I have a couple regex hilighters:

    Hilight an AHK label,
    LABEL:
    [A-Za-z_0-9]+:$

    Hilight variables, like FOO+=, FOO:=, FOO.=
    [A-Za-z0-9_#[]@-]+(| |t)+(+|-|.|:)=[ ]?
    Now hilight the .=, :=, etc so it’s not the same colour as the variable
    (+|-|.|:)=

    Hilight variables inside percent signs.
    \%[a-zA-z0-9#_@$?[[]+\%

    While you can’t specifically call your regex a line-comment as such, you can just choose a text color for your regex that matches what you want for the line-comment.
    And do:

    ^.

    Hilight right side, as Yutaka indicated.

    #9108
    shx
    Participant

    Thanks Yutaka and CrashNBurn.

    This has been most helpful

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.