s3a
March 29th, 2017, 01:16 AM
If I do
egrep "thin[g]{2,3}" ./list.txt
, it shows me all the occurrences "thin" followed by 2 or more "g"s.
In other words, the above egrep line seems to do the same thing as the following egrep line.:
egrep "thin[g]{2,}" ./list.txt.
I understand that, if there are four or more occurrences of the character g after thin, it can be concluded that are there is subtext that is either [/i]thingg[/i] or thinggg, regardless of how many extra "g"s there are, and that that's why egrep is not ignoring the output with more than three consecutive "g"s after "thin", but how can I get it to behave as I intend for this particular case?
Any input would be greatly appreciated!
egrep "thin[g]{2,3}" ./list.txt
, it shows me all the occurrences "thin" followed by 2 or more "g"s.
In other words, the above egrep line seems to do the same thing as the following egrep line.:
egrep "thin[g]{2,}" ./list.txt.
I understand that, if there are four or more occurrences of the character g after thin, it can be concluded that are there is subtext that is either [/i]thingg[/i] or thinggg, regardless of how many extra "g"s there are, and that that's why egrep is not ignoring the output with more than three consecutive "g"s after "thin", but how can I get it to behave as I intend for this particular case?
Any input would be greatly appreciated!