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

Regular expression question

Expand Messages
  • mtnbiker2k
    While doing a search & replace, I wanted to prepend text to each line, so I used a find pattern like this ^{.} My problem is that this pattern matches every
    Message 1 of 2 , Feb 23, 2005
      While doing a search & replace, I wanted to prepend text to each
      line, so I used a find pattern like this ^{.} My problem is that this
      pattern matches every character in the line, as if I were using only a
      period as my pattern. Is there something I'm missing, or is there a
      bug in the regexp engine? The same pattern behaves as expected in a
      couple of other editors (syn text editor and Jext).

      thanks
    • Don Daugherty
      ... Have you tried using just ^ for the search and then putting your prepend text in for the replace ? I assume Regular Expression is checked
      Message 2 of 2 , Feb 24, 2005
        mtnbiker2k wrote:

        >
        >While doing a search & replace, I wanted to prepend text to each
        >line, so I used a find pattern like this ^{.} My problem is that this
        >pattern matches every character in the line, as if I were using only a
        >period as my pattern. Is there something I'm missing, or is there a
        >bug in the regexp engine? The same pattern behaves as expected in a
        >couple of other editors (syn text editor and Jext).
        >
        >
        Have you tried using just ^ for the "search" and then putting your
        prepend text in for the "replace"? I assume Regular Expression is checked
      Your message has been successfully submitted and would be delivered to recipients shortly.