Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

{n,m} quantifiers ot work in awk 1

Status
Not open for further replies.

NullTerminator

Programmer
Oct 13, 1998
293
US
I can't seem to get [0-9]{6,6} to match anything
\d\d\d\d\d\d won't match either.

Is the regex in gawk somewhat weak?

 
Use --posix or --re-interval switch:

Code:
gawk --posix '/[0-9]{6}/' file
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top