perl -e '($x=shift()) =~/([=<>!]+)/ and print "\[$x] has \[$1]\n"' "Range is != 4%" [Range is != 4%] has [!=]