SPUG: Self referecing URL

marlin marlingreene at mindspring.com
Sat Sep 23 13:54:02 CDT 2000


Problem was escaping the closing <\/A 

also changed the CAT.* to [a-z][a-z]\d\d\d\d since the catalog number
always has a pattern like:  ch9822 -- that is, 2 characters and 4 digits,
and this eliminates the space being part of \1.

This works as expected.

Is there a better way to specify to match 4 digits?

Thanks to all who replied.

Marlin

>what about trying :

>$item_text =~ s/(NUM\d+)\s/<A HREF=get_page.pl?cat_num=\1>\1<\/A>/g;

>you must esc the closing /a tag, try using \d+ inside the params and move the
>\s outside the params, unless you want the space in \1.


-- 
	3 Hats Design
	INTERNET  PRINT  ILLUSTRATION
	5201 15 Ave NW 
	Suite 220
	Seattle, WA 98107
	206.784.1641 phone
	206.784.2231 fax
	marlin at 3hats.com
	http://www.3hats.com

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     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