Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
(And, despite the OP's claim, '*/' in a string literal isn't a problem.)
The OP didn't identify the language involved, so I took him at his word.

No offense intended, but that's hilarious. If you took them at their word with regard to '*/', then you must not have with regard to '/*'.

Seems I don't have the 'I-know-better-than-the-OP' gene that you and several others around here have. I don't miss it.

Where did I say a specific language that I was assuming? I guess you have the "You know better than some" gene, since you aren't taking me at my word.

That insult is so comical in the face of you presuming that this unspecified language accepts the following for string literals: "(?:\\\\|\\[abfnrt]|\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2,4}|\\"|[^"])+?". That is an impressively specific set of features for an unspecified language.

I tried to be quite polite. But I am not surprised that you found it so very hard to admit to even a simple mistake that you responded with an attack. Just saddened.

The OP didn't say that they are using a language that parses string literals inside of block comments. They certainly didn't say that their language parses string literals only inside of block comments.

The idea of there even existing a language where string literals are parsed only inside of block comments is quite humorous. But that is all that your regex tries to handle.

But composing the regex 'backward' in that way is quite a simple mistake. The kind of mistake I make all the time. Most people do.

I am sorry my correction caused you distress (or seemed to). That wasn't my intent. I would appreciate it if you would at least refrain from responding with another insult. (I thought pointing out the mistake was actually more polite than down-voting and not commenting, something you've complained about repeatedly.)

- tye        


In reply to Re^4: Regex to strip comments (out not in) by tye
in thread Regex to strip comments by zuma53

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (3)
    As of 2014-08-31 03:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (294 votes), past polls