in reply to Set the flag

You could use perlre