Hacker News new | ask | show | jobs
by comex 5137 days ago
Capture group would be something like

    /the number is ([0-9]+)/ { print $1; }
There are many ways to do this (gawk sorta supports it, perl can do it easily enough with

    perl -pe 'print "$1\n" if /the number is ([0-9]+)/'
but it's a bit cumbersome), but it would be much nicer if awk directly supported it.

Not sure what you mean about lex; if I decide to go ahead and write my ideal shell I could use it, but that's A Project, a large part of which is designing the syntax and deciding what commands to implement. And I'm lazy. :)

1 comments

Can you give an example of some sample input and how you want the output to look? I'm stupid and this is the only way I can be sure I know what you're trying to do.