# warning win32 doublequotes oneliner perl -e " print $1 if $ARGV[0]=~/(AAA)[^AX].+XXX/" ABBBAAACCCXXX AAA