I am trying to create a regex match, where I want to match towards multiple character classes (hyphen and \w). For some reason there seems to be some limitation in a(g)awk. This works,
if (match("this is,not-working",/,\w+/)>0) print "Working"
while if I add brackets,
if (match("this is,not-working",/,[\w]+/)>0) print "Working"
it seems to break. The reason I need this is because I want to be able to do [-\w] to match word and hyphen.
How is this possible to do in (g)awk?