-- -Content-Transfer-Encoding: quoted-printable Jillian Kozyra <jillyh0 / gmail.com> writes: > question.gsub! ("<a href=\"\/([.]+)\/\" >$/i", "") > or also: question.gsub! ("<a href=\"\/([a-zA-z0-9]+)\/\" >$/i", "") First of all: "this is a string" vs. /this is a regexp/ Second: You probably don't want to use $, unless you are sure that the string in question only appears at the end (but then, where is the closing </a>?) And last but not least: Do you only want to remove the <a ...>, also the </a> or actually also everything in between those two? Either way, here are some basic regexps: /<\/?a.+?>/ /<a.+?>/ /<a.+?>.+?<\/a> -- Dominik Honnef dominikho / gmx.net -- -Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) iEYEARECAAYFAkpunBsACgkQePZ2jI1LDteqqwCeNYemOjU88k64oJ6hzJWaOh1n ttwAoMOveRBR+xJIKc8cDvLggdKsqgmc UK -----END PGP SIGNATURE----- -- -