SPUG: Strange regex problem

Lou Hevly lou at visca.com
Fri Sep 22 14:26:37 CDT 2000


At 09:04 22/09/00 -0700, Trevor Leffler wrote:
>SPUGers,
>
>  I'm working with a substitution regex that correctly does a
>substitution, but the $1, $2, etc. that I expect are empty when I use
>the //i and //g modifiers together. 

<snip>

Seems to work on Windows, AS v5.6.0:

C:\usr\site\lib>perl -e "$foo = 'abcdefghijklmnopqrstuvwxyz'; $foo =~ s/(hi)(.*)
(stu)/$3$2$1/gi; print \"$1, $3!\n$foo\n\""
hi, stu!
abcdefgstujklmnopqrhivwxyz

-- 
All the best (Adéu-siau),
Lou Hevly
lou at visca.com
http://www.visca.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