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

Re: Can you please help???

Expand Messages
  • Sheri
    ... Hi Rudi, Using regex in NoteTab s Find and Replace dialog or clipcode, you can match CRLF with R or with r n. Another way is to include linebreak
    Message 1 of 4 , Nov 19, 2009
    • 0 Attachment
      --- In ntb-scripts@yahoogroups.com, "RudiV" <ms65@...> wrote:
      >
      > I had to do the Replace option in 3 steps: as I could not figure
      > out how to embed the CRLF and the end of each line into the find
      > command)
      >
      > 1) Line 2 as: find: <cardset(.*) replace with ABCDEF
      > 2) Line 3 as: find: releasedate(.*) replace with ABCDEF
      > 3) Line 4 as: find card_count(.*) replace with ABCDEF
      > 4) Save as a txt file
      > 5) Use Notepad to find ABCDEF and replace with a blank line.
      >
      > (I could not figure out what character in your software to
      > specify in the replace field for a blank line)

      >
      > What I would have liked to have been able to do was steps 1-3
      > above in 1 find sequence (syntax?) and then have replace replace
      > the found string with blank lines.
      >
      > Thanks in advance for you assistance!!!
      >

      Hi Rudi,

      Using regex in NoteTab's Find and Replace dialog or clipcode, you can match CRLF with \R or with \r\n. Another way is to include linebreak characters in what matches dot, by including (?s) at the beginning of your find pattern.

      You can include a CRLF in replacement text with \r\n

      However, I believe the following would best suit your purposes:

      ^!Replace "^(<cardset|releasedate|card_count).+" >> "" RAWS

      Since the CRLF is not matched, it is still in the file after the replacement. If you want an extra line inserted for each match, it would be:

      ^!Replace "^(<cardset|releasedate|card_count).+" >> "\r\n" RAWS

      There is a detailed, techy regex.chm file in the NoteTab application folder that gives all the details for the PCRE regex engine used in NoteTab. You can access it from the Help menu.

      Regards,
      Sheri
    • Don - HtmlFixIt.com
      Sheri, Now is a good time for us to repeat the helpful links for regex help that you have given before (one is at end of this email). One of them is what
      Message 2 of 4 , Nov 19, 2009
      • 0 Attachment
        Sheri,

        Now is a good time for us to repeat the helpful links for regex help
        that you have given before (one is at end of this email). One of them
        is what finally got me over (or at least on) the hump of understanding.
        It was a helpful tips type of presentation. I converted it from a
        powerpoint to plain text so that I could use it in notetab easier (and
        search it better) and I also now keep a "handyregexbits.txt" file in my
        favorites. It has things like (?s) in it which is the multi-line
        designation.

        I find I use it less and less as I actually now start to understand what
        I am doing and why I am doing it.

        Lastly I would encourage anyone starting with regex to get regex buddy.
        Whenever a pattern I write doesn't match as expected, I use that
        program. I start slowly at the left and move to the right and it shows
        what is matched when you select part of the search term it highlights
        the match in the lower window. Solves many issues.

        Someday I'll tackle look backs and assertions and stuff like that ...
        but for now, I really think I can do some amazing stuff with a good
        regex search term. I still use \r\n just because \R didn't work when I
        started ... I'll try to improve and actually I have used \R a few times
        lately.

        Have a great night everyone.

        Don

        The link:
        http://www.gravitonic.com/talks/
        Andrei’s Regex Clinic
        I note that there are some more recent versions -- I'll have to download
        and see if they have advanced.

        I believe regex discussion is essentially welcome either her or in clips
        list. Is that fair? I have copied both groups.

        >
        > Hi Rudi,
        >
        > Using regex in NoteTab's Find and Replace dialog or clipcode, you can match CRLF with \R or with \r\n. Another way is to include linebreak characters in what matches dot, by including (?s) at the beginning of your find pattern.
        >
        > You can include a CRLF in replacement text with \r\n
        >
        > However, I believe the following would best suit your purposes:
        >
        > ^!Replace "^(<cardset|releasedate|card_count).+" >> "" RAWS
        >
        > Since the CRLF is not matched, it is still in the file after the replacement. If you want an extra line inserted for each match, it would be:
        >
        > ^!Replace "^(<cardset|releasedate|card_count).+" >> "\r\n" RAWS
        >
        > There is a detailed, techy regex.chm file in the NoteTab application folder that gives all the details for the PCRE regex engine used in NoteTab. You can access it from the Help menu.
        >
        > Regards,
        > Sheri
      Your message has been successfully submitted and would be delivered to recipients shortly.