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

6137Re: [edit+] Reg Expression Question

Expand Messages
  • Sergio Pereira
    Jan 6, 2009
      This worked for me:
      [A-Z][A-Z][A-Z][a-z][A-Z][A-Z][A-Z]

      If you need the exact same 3 letter sequence on each side, I believe
      editplus' regex parser does not understand the back references like:

      ([A-Z][A-Z][A-Z])[a-z]\1

      A cleaner expression would be:

      ([A-Z]{3})[a-z]\1

      But editplus does not support the { } yet.

      Hope this helps
      ______________________________________
      Sergio Pereira



      On Tue, Jan 6, 2009 at 1:19 PM, T Cosmas <t_cosmas@...> wrote:
      > I need to search through some text to find a string which follows the
      > pattern 3 capital letters + 1 lowercase letter + 3 capital letters.
      > From the way the problem was stated, I am not sure if the repeating
      > characters are all the same so that is why I tried the "+" versions.
      > The statement is: "One small letter, surrounded by EXACTLY three big
      > bodyguards on each of its sides."
      >
      > I've tried
      >
      > [A-Z^a-z][A-Z^a-z][A-Z^a-z][a-z][A-Z^a-z][A-Z^a-z][A-Z^a-z]
      >
      > [A-Z^a-z]+[a-z][A-Z^a-z]+
      >
      > [^a-z]+[a-z][^a-z]+
      >
      > But none of them seem to do the job.
      >
      > Thanks.
      >
      >
      > ------------------------------------
      >
      > http://www.editplus.comYahoo! Groups Links
      >
      >
      >
      >
    • Show all 3 messages in this topic