Help for this page
#!/usr/bin/perl -w
use warnings;
$str = s/.*\-D*?//;
$_ = "text1 text2 -f -DFLAG1 -global -DFLAG2 -DFLAG1"; s/.*?(?=-D)//; print "$_\n";
s/[^-]+-[^-]+//;
s/ [^-]+ # Negated character class - match one or more ... [^-]+ # Negated character class - match one or more # of anything that is not a dash: "f " //x;