<quote>I'm having trouble groking how this helps:

<font size="-1><a href="#PINPAORToc" name="PINPAORTxt" style=text-decoration:none">... The font size leaves me puzzled on two counts:</quote>

I really appreciate the help and actually I have some things to look at to help makes things leaner for sure. But my question, the only thing I really need answered ATM is:
How can I extract the first letter from each word in a string and join them together?
I have been searching and it looks like perhaps using perl I need to use the substr, split, and join functions, so if anyone might be able to provide some sort of example I would be grateful.
It seems like it might be a similar request to extracting the first letter of names in a generated list or file?

I am uncertain if a sed example might help but something I have tried in sed is:

sed -ri 's/<b>([A-Za-z])([A-Za-z:,]{0,20})[ ]{0,1}([A-Za-z]{0,1})[ ]{0,1}([A-Za-z:,]{0,20})[ ]{0,1}([A-Za-z]{0,1})[ ]{0,1}([A-Za-z:,]{0,20})[ ]{0,1}([A-Za-z]{0,1})(.*)<\/b>/<font size="-1"><a href="#\1\3\5\7Toc" name="\1\3\5\7Txt" style="text-decoration:none">\1 \2 \3 \4 \5 \6 \7 \8<\/a><\/font><br>/' 1.html

which is getting a little unruly not to mention I am limited to capturing on the first letters of the first four words in the string because sed only has nine memory buffers to recall from, so I think by turning to perl I will give myself a lot more options to do what I want.

cheers nap


In reply to Re^2: search and using first letter of words on a line by Anonymous Monk
in thread search and using first letter of words on a line by naphelge

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.