• (unregistered) in reply to Blue
    Blue:
    The main thing I hate about using regex in code is that you have to escape (ie \", or even worse, escaping the \'s in the expression so they become \\) so many of the metacharacters, etc, that it becomes a nightmare to seperate the actual regex expression from the mangling you had to do to get it into a string variable.

    Wrong language, then. Perl is the home of regexes, and no escaping is required. You can even delimit the regex with whatever characters you like, in case the normal ones ( / ) appear a lot in the regex.

    Pete

  • (unregistered) in reply to JamesCurran
    JamesCurran:

    There is, in fact, nothing wrong with a domain name starting with a numeral.

    There used to be. I believe 3com managed to get it changed.

    Pete

  • (cs) in reply to

    Pete, agreed.

    I forgot to mention that you can use the "literal string" construct by prefixing the string with a @, it will treat everything inside of @"<regex here>" as literals, and then they DON'T need to be escaped.


  • (cs)
    <FONT style="FONT-SIZE: 11px; LINE-HEIGHT: 14px; FONT-FAMILY: verdana,arial,sans-serif" color=#0000ff>Irregular Menstruation?</FONT>
    <FONT style="FONT-SIZE: 10px; COLOR: #000000; LINE-HEIGHT: 12px; FONT-FAMILY: verdana,arial,sans-serif">Menstrual Cycle Natural Support One Product with Multiple Formulas! </FONT>
    <FONT style="FONT-SIZE: 11px; LINE-HEIGHT: 14px; FONT-FAMILY: verdana,arial,sans-serif" color=#0000ff>Fix Errors on Your PC</FONT>
    <FONT style="FONT-SIZE: 10px; COLOR: #000000; LINE-HEIGHT: 12px; FONT-FAMILY: verdana,arial,sans-serif">Pc problems? If your computer isn't running like it used to, scan now! </FONT>
    <SCRIPT><!-- nw='#ffffff';nw=nw.slice(1);if('')document.write('<img border=0 align=left height=13 width=13 src="http://pagead2.googlesyndication.com/pagead/'+nw+'_new_ico.gif" alt=""/>');//--></SCRIPT>

    ^ Current google ads. o.O

  • anonymous coward (unregistered)

    "the use of non-capturing groupings ("(?: )") without any actual backreferences"

    I'm not sure why that's relevant. I use non-capturing grouping all the time, and I almost never use backrefs. Grouping specifies precedence, too. You know, like (1+2)*3 and all those other places you use parentheses.

Leave a comment on “Irregular Expression”

Log In or post as a guest

Replying to comment #:

« Return to Article