You're replying to a comment by waldner.

waldner Permalink
October 24, 2008, 08:57

Unix User:

That is easily done with gawk, see the last tip. You could do eg

gawk -v RS='abc([0-9]+)def' 'RT{gsub(/[^0-9]/,"",RT)print RT}

Of course, the exact regexes used for RS and in the gsub vary from time to time depending on what you want to achieve. Another solution is using gensub(), again from gawk.

Unfortunately, standard awk regexes lack backreferences, so getting what you want using standard awk would not be easy.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "quake3_100": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.