http://www.perlmonks.org?node_id=1007438

wellmje has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am looking for a way to validate that this use of regular expressions will match all and any commands except SU on a Red Hat Linux server when following Perl rules

 (?!.*/su[\r\s]).*/.*

Any assistance or direction would be appreciated. I know there are many other ways to achieve the same goal but I am being told that this should work. Thank You in advance!