#!/usr
# AWK hl test

# <beginfold id='3'>BEGIN</beginfold id='3'> and <endfold id='3'>END</endfold id='3'> are also matched as patterns
BEGIN <beginfold id='1'>{</beginfold id='1'>
	p = 0;
<endfold id='1'>}</endfold id='1'>

/some pattern/ <beginfold id='1'>{</beginfold id='1'>
	p++;
<endfold id='1'>}</endfold id='1'>

# / inside brackets is not considered end of expression
# a loose division operator (/) is not mismatched as a pattern.
$1 =~ /[^abc/]def/ || b == 3 / 5 <beginfold id='1'>{</beginfold id='1'>

	gsub ( FILENAME );

<endfold id='1'>}</endfold id='1'>

# TODO and FIXME also work in comments in Awk.

# Also backslash in patterns works.
/\/usr\/bin\/awk/ <beginfold id='1'>{</beginfold id='1'> print "This is me"; <endfold id='1'>}</endfold id='1'>

END <beginfold id='1'>{</beginfold id='1'>
	print p;
<endfold id='1'>}</endfold id='1'>
