[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Counting number of matches in record/string
From: |
Jarno Suni |
Subject: |
Re: [bug-gawk] Counting number of matches in record/string |
Date: |
Thu, 3 Sep 2015 19:04:41 +0300 |
On Thu, 3 Sep 2015 17:23:30 +0300
Jarno Suni <address@hidden> wrote:
> I which gsub(regex,"&",[string]) was optimized to count matches, if
> not done already. Or is there a better way to count matches in
> record/string?
The solution using mawk 1.3.4 was the fastest in my system (also
compared to the grep -o | wc -l solution):
http://stackoverflow.com/a/32379988/4414935
--
Jarno Ilari Suni - http://www.iki.fi/8/