c# - How can you match words with more than one character? -


I would like to use a regular expression to match all the words with one more letter, the same four.

It should not match: ttttt, rrrrr, ggggggggggggg

This should coincide: rttttttt, words, wwwwwwwwwu

The following expression will be a move.

  ^ (? & Lt; first & gt; [a-zA-Z]) [a -ZA-Z] *? [  
  • Capture some more letters (to avoid recurrence of negligence)
  • Make sure the next character is used by FIRST using a negative attribute
  • Capture all (due to at least one claim) remaining characters
  • Note that searching for a different character than the first characters is sufficient because If no character is different from fi Rst is the same one all the characters.

    You can shorten the expression to the following.

      ^ (\ w) \ w *? (?!? 1) \ W + $  

    This will match some more characters than [a-zA-Z].


    Comments

    Popular posts from this blog

    python - Overriding the save method in Django ModelForm -

    html - CSS autoheight, but fit content to height of div -

    qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -