Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??

I just wanted to point out something that your response seems to imply.

You do have a word break and then a new line at the end, but there isn't a space before it.

Even if he had a space before the newline it wouldn't match, because there wouldn't be a word break between the space and the end of the string. As inman says below, I can't think of any situation where / \b$/ would match. I'm not sure what it is about the word break anchor, but it seems to be the most misunderstood of the anchors. I know I had problems getting a grasp on it.

In reply to Re^2: Regex Anchors confusion by kelan
in thread Regex Anchors confusion by silent11

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.