Jump to content

Regular expressions [solved]


Recommended Posts

I expected this to find words in a word-list which had at least 8 characters and no more than 9.

egrep '[A-Za-z]{8,9}' wordlist

 

My problem is that the 9 doesn't seem to make any difference.

 

So I guess I don't really understand how this works.

 

A number of books and tutorials seem to suggest that n is finite

 

Match only n times {n} but this clearly doesn't seem to be the case.

Seems really to be match at least n times.

 

Could some regex guru explain this in small words? I did this last year and don't remember being surprised by the results!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...