I am a registered BBEdit user, on version 8.2.6.
I am new to scripting, so I might need a little hand-holding on this
one...
I have a BBEdit document (roster-links.php) that has line after line
of people's names, and surrounding each name is a unique A HREF tag.
with a\r line break at the end of each string.
Example
<a href="display_artist.php?id=13" class="textlink">Tom Jones</a>
<a href="display_artist.php?id=33" class="textlink">Molly Anderson</a>
I have a second document (index.php), inside of which, THERE MAY BE
SOME SUBSET of these people's names which appear throughout the text.
These names appear with <b>...</b> tags around them, but no links.
My mission (I have no choice but to accept it!) is to ask BBEdit to
"LOCATE names in roster-links.php (which will be the string of text
between the opening A tag and the closing A tag WHICH APPEAR IN THE
INDEX.PHP"), and in cases where the name appears in index.php, copy
the entire matching A HREF tag from roster-links.php (which will, of
course, include the person's name as well, which will be come the
new, linked text in index.php) and locate the names in index.php that
match and replace the name with <a href="unique-link.php">Firstname
Lastname</a>
here's the example again:
Example A
<a href="display_artist.php?id=13" class="textlink">Tom Jones</a>
<a href="display_artist.php?id=33" class="textlink">Molly Anderson</a>
Then in index.php, there might be this currently:
Watch as <b>Tom Jones</b> and his friend <b>Molly Anderson</b>
deliver first rate comedy together on stage.
Once the script runs, I'd like BBEdit to figure out and execute this
result:
Watch as <b><a href="display_artist.php?id=13" class="textlink">Tom
Jones</a></b> and his friend <b><a href="display_artist.php?id=33"
class="textlink">Molly Anderson</a></b> deliver first rate comedy
together on stage.
Is there anyone who'd be willing to help me with this? I don't even
believe I know how to "run" a script in BBEdit (never tried), let
alone author it. Is this a piece of cake for anyone?
Thank you so much in advance!!
Todd Howard
[EMAIL PROTECTED]
--
------------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_script.shtml>
List archives: <http://www.listsearch.com/bbeditscripting.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>