Jump to content

Regular Expression


JRowe
 Share

Recommended Posts

I'm trying to select comments and just comments,without getting anything else, and deliberately exclude "<" and ">".It's causing undesired behavior in my code highlighting widget.

I'm using this as a pattern:

/((?!\&lt);.*)/gm

I'm not sure how, here's an example of what I don't want:

http://www.autoit.me/code-posting-test

It should display as in scite, but after the include and any greater than or less than tags, it think's there's been a comment.

I'm kind of puzzled at this point.

Link to comment
Share on other sites

Slowly becoming less puzzled, although now the only thing wrong is that I can't have a comment at the top of the code. Assuming that it's the only thing wrong, I think I got it fixed.

([^(lt;.*)];.*)/gm
Link to comment
Share on other sites

  • Moderators

What happens when the semi colon is in a valid string?

eg.

Send("!;") ; This is a comment

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

It appears to break. looks like I have some conditionals to whip up. You'd think that wordpress had an easy geshi widget or something. Everything I've found so far is either so complicated as to be nearly worthless compared to formatting by hand, or you have to build it yourself. Anyway, when this is done I'll post it so other people can use the syntax highlighter.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...