Anonymous user
Regular expressions: Difference between revisions
m
→{{header|AWK}}
m (→{{header|AWK}}) |
|||
Line 166:
=={{header|AWK}}==
AWK supports regular expressions, which are typically
<lang awk>$ awk '{if($0~/[A-Z]/)print "uppercase detected"}'
abc
Line 187:
abCDefGH
ab(CD)ef(GH)</lang>
Regular expression negation can be achieved by combining the regular expression binding operator with a logical not operator, as follows:
if (text !~ /strawberry/) {
print "Match not found"
}
=={{header|BBC BASIC}}==
|