-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello folks, I tried to narrow this case down to see exactly where it fails, but it seems when I trim the problem down it goes away. ;) Anyway, the follow program: test1 = "${${x}" test2 = "\\${x}" regex1 = /(^|.)\$\{([nh_!v?xrgybmcwXRGYBMCW]*|["']\w+['"])\}/ regex2 = /(.|^)\$\{([nh_!v?xrgybmcwXRGYBMCW]*|["']\w+['"])\}/ puts test1 =~ regex1 puts test2 =~ regex1 puts test1 =~ regex2 puts test2 =~ regex2 Gives the following output. 1 (correct) 0 (correct) nil (wrong! it DOES match, at 1) 0 (correct) Of course, the ONLY difference in the regexes is one has (^|.) and the other has (.|^). This is using a CVS version, which maybe is the culprit. ;) ruby 1.7.0 (2001-05-24) [i686-linux-gnu] - -- Wesley J. Landaker - wjl / mindless.com http://www.landaker.net PGP DSS/DH Key: 0x0F338E07 PGPKey FP: 3AAA 424B B488 198E B68B C0E5 390A BACA 0F33 8E07 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: All your base are belong to us. iEYEARECAAYFAjsc6/gACgkQOQq6yg8zjgenFgCgl2lG+hVlrInkbg0M9TPGm0xb glgAoIs6ZCvVfZkx9YYZtmhzwNTEyM2K =zzCK -----END PGP SIGNATURE-----