That's some pretty ugly HTML (both versions), so I'm going to hope there are some typos in it. You may want to use a module to parse that, or if the tags will always be the same, strip it out with a regex. But once you've got your title, you can get your acronym with something like this:
my $title = "Part II: Nietzsche's Project, An Overall Review"; my $acronym = join '', ($title =~ /(?:^|\s+)(\w)/g); say $acronym; # -> PINPAOR
That'll give you a string containing each word character that follows the start of the string or a group of whitespace characters. You could narrow \w further to just take capital letters or whatever you like.
In reply to Re: search and using first letter of words on a line
by aaron_baugher
in thread search and using first letter of words on a line
by naphelge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |