Loading ...
Sorry, an error occurred while loading the content.
 

Re: Searching for words that are repeated more than once consecutively

Expand Messages
  • Gary Holloway
    / FROM: Robert Montante , Jul 3 9:04 2002 ... It really depends what you consider a word that you re looking for. w Will only find
    Message 1 of 10 , Jul 3, 2002
      / FROM: Robert Montante <bobmon@...>, Jul 3 9:04 2002
      | ABOUT: Re: Searching for words that are repeated more than once consecutively
      |
      | >Bram Moolenaar:
      | > /\(\<\k\+\>\)\s\+\1
      | >
      | >Preben Peppe Guldberg:
      | > /\(\<\k\+\>\)\s\+\1\>
      | >
      | >Gary Holloway:
      | > /\(\<\k\+\>\)\(\_s\+\<\1\>\)\+
      |
      | Ummm... why are you guys all using the "\k" atom? Wouldn't "\w" make
      | more sense?

      It really depends what you consider a "word" that you're looking for.

      \w Will only find [0-9A-Za-z_]
      \k Is dependent upon your 'iskeyword' setting.

      It's really a matter of preference.

      -gary

      | So here's my entry:
      | /\(\<\w\+\>\)\_s*\1\>
      |
      | (This should match the first two words of a three-word repetition.)
      |
      | -bob,mon.
      |
      \ END: Robert Montante
    Your message has been successfully submitted and would be delivered to recipients shortly.