SPUG: extracting text between <a> and </a>

Chuck Keagle teccbk1 at sdc.cs.boeing.com
Thu Oct 5 12:58:34 CDT 2000


Now I'm new with Perl (just had Dr. Tim's beginner class a couple weeks
ago), but would a pattern match do the trick?

    m|<a[\w:"/= \.]*> ([\w ]*)</a>| and $text = $1;

If I'm way off base, please don't chastise me too harshly.

-- 

(fixed width font)                                  //\\
 __________________________                            \\
 Chuck Keagle                   \\                  .__=.\\
 chuck.keagle at boeing.com          \____          ,' H-D \-\<)
 Shared Services Group             \   \______.,(_______/_:\
 (425) 865-5394                 |==.\______//  # /# #\ || : \____
 Fax: (425) 865-2221              '\\\ =''=//|_|##(O)##|| `./\---.
 M/S 7J-04     _____________  /\   / ,`--'./# ======='//,  //.\ . \
                     _______  \ \_(_:_ at O__)_///<_>O////    ( (@O ) )
                        _____  \_____________/======'O'     \ `-' /
                                  __`-----'__________________`---'___

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/





More information about the spug-list mailing list