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

20429Re: [NTB] Search and replace query.

Expand Messages
  • John Fitzsimons
    Feb 3, 2008
    • 0 Attachment
      On Sun, 03 Feb 2008 19:52:49 -0500, buralex@... wrote:

      > John Fitzsimons <johnf@...> said on Feb 03, 2008 19:11
      >-0500 (in part):

      Hi Alex,

      >> I want to find all lines in a document that contain "a".

      >> I want to find all lines in a document that don't contain "a".

      Actually the letter was "i" but it was the general syntax I was
      wanting.

      >> How do I do this using the find or search and replace options ? I
      >> have tried things such as ^.@(a).@$\n and it doesn't work. :-(

      >> Using NoteTab Pro 4.95

      >not sure what you thought the ampersands (@) would do, but circumflex
      >before a character in a character class says:
      >any character except it ie. [^a] matches NOT "a"
      >so ^[^a]+$ matches ... beginning at char 1 a string of NOT a's through
      >the end of line ($)

      Wow ! Excellent. Thanks for the very speedy/accurate reply, it is very
      much appreciated. :-) :-) :-)


      Here is what I started with ;

      paxton
      pinite
      taipei
      tiepin
      atone
      axone
      epona
      inapt
      inept
      ionia
      oaten
      panto
      patio
      paton

      Using your ^[^i]+$ replaced with nothing got me......

      pinite
      taipei
      tiepin



      inapt
      inept
      ionia


      patio

      Is there any way I can adapt that to get....

      pinite
      taipei
      tiepin
      inapt
      inept
      ionia

      In other words, find the words without "i", replace them with nothing,
      and delete the empty line ? Leaving behind the list of words/lines
      containing "i" without spaces ?


      Regards, John.
    • Show all 7 messages in this topic