in reply to What does belg4mit's signature do?

What part can't you figure out?

So what does it do? My interpretation is that it looks for a backspace word boundary, followed by a semi-colon, followed by any one of 'm', 'n', 's' or 't', and replaces that with an apostrophe followed by the alpha character that it found. It does this globally on the line.

So it probably allows belg4mit to clean up text files where he hit the ; instead of the ', since they're next to each other on his keyboard (as they are on mine.

Did you figure out the part that you missed now?

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Update: As my learned brothers NetWallah and VenTatsu point out, \b is not a backspace in this context but a word boundary. Thanks brothers.

Update 2: Again, as DigitalKitty has pointed out, my conslusion doesn't include the corrections described in my first update. Hope fully these updates don't get longer than the original post. :(

Replies are listed 'Best First'.
Re^2: What does belg4mit's signature do?
by NetWallah (Canon) on Sep 30, 2004 at 21:28 UTC
       talexb:   The \b is a backspace key

    Nope.

    From "perlre":

    \b Match a word boundary

        Earth first! (We'll rob the other planets later)

Re^2: What does belg4mit's signature do?
by Ven'Tatsu (Deacon) on Sep 30, 2004 at 21:28 UTC
    You have a minor problem with your explinaiton, from perlreref
    This one works differently from normal strings: \b An assertion, not backspace, except in a character class
    In regular expressions \b matches word boundries.