Help with regex needed


#1

Here is the array I am scanning:
["\n

 <a href="/search~S13?/rWR%20121/rwr+121/1,7,9,B/
frameset~2489041&FF=rwr+121&1,1,">The Academic Writer: A Brief Guide</
a>\n\n\n Ede, Lisa\n\n\n\n Valley
Reserves – VR 282 – AVAILABLE\n\n\n\n \n\n\n</
tr>\n\n <a href="/search~S13?/rWR%20121/rwr+121/1,7,9,B/
frameset~1334646&FF=rwr+121&1,1,">Cultural literacy : what every
American needs to know / E.D. Hirsch, Jr. ; with an appendix, What li</
a>\n\n\n Hirsch, E. D. (Eric Donald), 1928-\n\n
\n\n Valley Reserves – LC149 .H57 1987 – AVAILABLE\n
\n\n\n \n]

I am trying to get the values (all but newlines and such) out from in
between the

Tried this :
s.first.scan(/<td >(.*?)</td>/mi)
But I never get the first

a href values.

Any help is appreciated. Thanks. Kim


#2

On Oct 22, 2008, at 12:38 AM, Kim wrote:

a>\n\n

\n Hirsch, E. D. (Eric Donald), 1928-\n\n
Any help is appreciated. Thanks. Kim
because the first is not a of course. Your regexp looks for:
/<td >
^
Did you mean something like %r{<td\b[^>]>(.?)}mi

Note that %r{} for a regexp literal can be more convenient when you
hope to match a slash.

-Rob

Rob B. http://agileconsultingllc.com
removed_email_address@domain.invalid