qse/ase/cmd/awk/match.awk

20 lines
413 B
Awk
Raw Normal View History

BEGIN {
print match ("hhhheeeo", /e+/);
print RSTART, RLENGTH;
print match ("heeeo", /e/);
print RSTART, RLENGTH;
print match ("heeeo", /t/);
print RSTART, RLENGTH;
print "--------------------------";
print match ("hhhheeeo", "e+");
print RSTART, RLENGTH;
print match ("heeeo", "e");
print RSTART, RLENGTH;
print match ("heeeo", "t");
print RSTART, RLENGTH;
print "--------------------------";
}