News for hackers. Stuff that matters.
Re:Show HN: Mawkdown – (Toy) Markdown Parser in Awk by asicsp on Sunday July 19, 2020 @12:25AM (#23886995)
As far as I know, 'match' function is part of POSIX spec for awk. Only the third array argument is specific to gawk. So, this should work for any awk.

    awk 'match($0, /^#+ /){l=RLENGTH-1; print "<h" l ">" substr($0,RLENGTH+1) "</h" l ">"}'
I checked it on https://awk.js.org/ and it did work

There are no comments on this comment yet.