in reply to Re: Re: Re: Re: A regex that does this, but not that?
in thread A regex that does this, but not that?

Quite right, very true, didn't think of that.

What if we add a not-whitespace-either to the character class?

#!/usr/bin/perl -w use strict; my $words='test Buffy testament Anya tot Willow tesseract Faith tent this is a problem right?'; $words =~ s/\b(t[^t\s]+t)\b/$1 eq "test" ? $1 : ''/ge; print $words;


($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print