#changed is to isnt #This doesn't work. Captures 'abcdef' instead of just 'ab' isnt(eval { 'abcdef' =~ /^(\w+)/; $1 }, 'ab', q{tried /^\w+/});