Aidan:
Thanks for the reply, I'm currently trying the regex approach and ran into a little bump. The pattern for grabbing the link's text description...
m|<a href=(.*?)>(.*?)</a>|
...will grab everything but "STF3A" and "STF1A".
Given:
Browse Tiger <a href="http://tiger.census.gov/cgi-bin/mapbrowse-tbl?la
+t=36.12000
&lon=-95.94135&wid=0.75&ht=0.75&mlat=36.12000&mlon=-95.94135&msym=redp
+in&off=CIT
IES&mlabel=Tulsa+County,+OK">Map</a> of area.<br>
$text will hold "Map" but when given:
Lookup 1990 Census <a href=http://venus.census.gov/cdrom/lookup/CMD=TA
+BLES/DB=C9
0STF1A/F0=FIPS.STATE/F1=FIPS.COUNTY90/F2=STUB.GEO/LEV=COUNTY90/SEL=40,
+143,Tulsa+
County>STF1A</a>
$text is empty...I've tried tweaking the pattern but I'm even more of a newbie with regex than I am with perl, any suggestions?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.