xref: /aosp_15_r20/external/one-true-awk/bugs-fixed/matchop-deref.awk (revision 9a7741de182b2776d7b30d6355f2585c0780a51b)
1*9a7741deSElliott Hughesfunction foo() {
2*9a7741deSElliott Hughes	return "aaaaaab"
3*9a7741deSElliott Hughes}
4*9a7741deSElliott Hughes
5*9a7741deSElliott HughesBEGIN {
6*9a7741deSElliott Hughes	print match(foo(), "b")
7*9a7741deSElliott Hughes}
8*9a7741deSElliott Hughes
9*9a7741deSElliott Hughes{
10*9a7741deSElliott Hughes	print match(substr($0, 1), "b")
11*9a7741deSElliott Hughes}
12