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

Replacement

Expand Messages
  • johnta1
    I have a file with this style of groupings: type= text name= b25 = calc1($value,43560,0); size= 15 There are other things in it, but this is generally how
    Message 1 of 7 , Jan 9, 2011
      I have a file with this style of groupings:

      type="text" name="b25" = calc1($value,43560,0); size="15"

      There are other things in it, but this is generally how it looks.
      The "b25" will change along with calc1 and the numbers in parenthesis.

      I would like to have just- type="text" size="15" left in this file.

      Then the part taken out- name="b25" = calc1($value,43560,0); - pasted into another empty file.

      There are about 1850 varying sections like the part taken out.

      :(

      Any help would be appreciated.
    • Don
      seeing the actual file is important, but a regular expression search could most likely extract the data you want Seeing a half dozen actual lines of the file
      Message 2 of 7 , Jan 9, 2011
        seeing the actual file is important, but a regular expression search
        could most likely extract the data you want

        Seeing a half dozen actual lines of the file would be helpful.

        On 1/9/2011 3:37 PM, johnta1 wrote:
        > I have a file with this style of groupings:
        >
        > type="text" name="b25" = calc1($value,43560,0); size="15"
        >
        > There are other things in it, but this is generally how it looks.
        > The "b25" will change along with calc1 and the numbers in parenthesis.
        >
        > I would like to have just- type="text" size="15" left in this file.
        >
        > Then the part taken out- name="b25" = calc1($value,43560,0); - pasted into another empty file.
        >
        > There are about 1850 varying sections like the part taken out.
        >
        > :(
      • John Wallace
        Here s some lines: acre-feet = cubic
        Message 3 of 7 , Jan 9, 2011
          Here's some lines:

          <tr>

          <td><input type="text" name=="b25" = calc1($value,43560,0);size="15" name="a25"></td>
          <td align="center">acre-feet = cubic feet</td>
          <td><input type="text" name=="a25" = calc2($value,43560,0);size="15" name="b25"></td>
          </tr>
          <tr>
          <td><input type="text" name=="b26" = calc1($value,325851,0);size="15" name="a26"></td>
          <td align="center">acre-feet = gallons</td>

          <td><input type="text" name=="a26" = calc2($value,325851,0);size="15" name="b26"></td>
          </tr>
          <tr>
          <td><input type="text" name=="b27" = calc1($value,0.404686,0);size="15" name="a27"></td>
          <td align="center">acres = hectares</td>
          <td><input type="text" name=="a27" = calc2($value,0.404686,0);size="15" name="b27"></td>
          </tr>

          Need this taken out and put in another file:

          name=="b25" = calc1($value,43560,0);
          name=="a25" = calc2($value,43560,0);
          name=="b26" = calc1($value,325851,0);
          etc

          The original part just have that part deleted:

          <tr>

          <td><input type="text" size="15" name="a25"></td>
          <td align="center">acre-feet = cubic feet</td>
          <td><input type="text" size="15" name="b25"></td>
          </tr>
          etc

          Thanks,
          John

          _____

          From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Don
          Sent: Sunday, January 09, 2011 6:15 PM
          To: ntb-clips@yahoogroups.com
          Subject: Re: [Clip] Replacement




          seeing the actual file is important, but a regular expression search
          could most likely extract the data you want

          Seeing a half dozen actual lines of the file would be helpful.

          On 1/9/2011 3:37 PM, johnta1 wrote:
          > I have a file with this style of groupings:
          >
          > type="text" name="b25" = calc1($value,43560,0); size="15"
          >
          > There are other things in it, but this is generally how it looks.
          > The "b25" will change along with calc1 and the numbers in parenthesis.
          >
          > I would like to have just- type="text" size="15" left in this file.
          >
          > Then the part taken out- name="b25" = calc1($value,43560,0); - pasted into another empty file.
          >
          > There are about 1850 varying sections like the part taken out.
          >
          > :(





          [Non-text portions of this message have been removed]
        • Don
          ^!SetListDelimiter ^P ^!Set %extract%=^$GetDocMatchAll( .*?(name.*;).* ;1)$ ^!ToolBar New Document ^!InsertText ^%extract%
          Message 4 of 7 , Jan 9, 2011
            ^!SetListDelimiter ^P
            ^!Set %extract%=^$GetDocMatchAll(".*?(name.*;).*";1)$
            ^!ToolBar New Document
            ^!InsertText ^%extract%

            On 1/9/2011 8:01 PM, John Wallace wrote:
            > <tr>
            >
            > <td><input type="text" name=="b25" = calc1($value,43560,0);size="15" name="a25"></td>
            > <td align="center">acre-feet = cubic feet</td>
            > <td><input type="text" name=="a25" = calc2($value,43560,0);size="15" name="b25"></td>
            > </tr>
            > <tr>
            > <td><input type="text" name=="b26" = calc1($value,325851,0);size="15" name="a26"></td>
            > <td align="center">acre-feet = gallons</td>
            >
            > <td><input type="text" name=="a26" = calc2($value,325851,0);size="15" name="b26"></td>
            > </tr>
            > <tr>
            > <td><input type="text" name=="b27" = calc1($value,0.404686,0);size="15" name="a27"></td>
            > <td align="center">acres = hectares</td>
            > <td><input type="text" name=="a27" = calc2($value,0.404686,0);size="15" name="b27"></td>
            > </tr>
          • Alec Burgess
            Looks like Don and I were working on this at the same time but I don t think (not tested) that Don s c lip satisfies the requirement that the found test be
            Message 5 of 7 , Jan 9, 2011
              Looks like Don and I were working on this at the same time but I don't
              think (not tested) that Don's c lip satisfies the requirement that the
              found test be removed from the original?

              Here's mine with some comments:
              ; <input type="text" name=="b27" = calc1($value,0.404686,0);size="15"
              name="a27">
              ; sep_file: name=="b27" = calc1($value,0.404686,0);
              ; orig_file: <input type="text" size="15" name="a27">
              ^!set %name_calc%=^$GetDocListAll("name==.*?;";"$0\r\n")$
              ;^!info ^%name_calc%
              ; strip %name_calc%
              ^!replace "name==.*?;" >> "" rwais
              ; put %name_calc% in a new file
              ^!menu file/new
              ^%name_calc%

              Regards ... Alec (buralex@gmail& WinLiveMess - alec.m.burgess@skype)



              On 2011-01-09 20:43, Don wrote:
              >
              > ^!SetListDelimiter ^P
              > ^!Set %extract%=^$GetDocMatchAll(".*?(name.*;).*";1)$
              > ^!ToolBar New Document
              > ^!InsertText ^%extract%
              >
              > On 1/9/2011 8:01 PM, John Wallace wrote:
              > > <tr>
              > >
              > > <td><input type="text" name=="b25" = calc1($value,43560,0);size="15"
              > name="a25"></td>
              > > <td align="center">acre-feet = cubic feet</td>
              > > <td><input type="text" name=="a25" = calc2($value,43560,0);size="15"
              > name="b25"></td>
              > > </tr>
              > > <tr>
              > > <td><input type="text" name=="b26" =
              > calc1($value,325851,0);size="15" name="a26"></td>
              > > <td align="center">acre-feet = gallons</td>
              > >
              > > <td><input type="text" name=="a26" =
              > calc2($value,325851,0);size="15" name="b26"></td>
              > > </tr>
              > > <tr>
              > > <td><input type="text" name=="b27" =
              > calc1($value,0.404686,0);size="15" name="a27"></td>
              > > <td align="center">acres = hectares</td>
              > > <td><input type="text" name=="a27" =
              > calc2($value,0.404686,0);size="15" name="b27"></td>
              > > </tr>
              >
              >


              [Non-text portions of this message have been removed]
            • Don
              that is true
              Message 6 of 7 , Jan 9, 2011
                that is true

                On 1/9/2011 8:54 PM, Alec Burgess wrote:
                > Looks like Don and I were working on this at the same time but I don't
                > think (not tested) that Don's c lip satisfies the requirement that the
                > found test be removed from the original?
                >
                > Here's mine with some comments:
                > ; <input type="text" name=="b27" = calc1($value,0.404686,0);size="15"
                > name="a27">
                > ; sep_file: name=="b27" = calc1($value,0.404686,0);
                > ; orig_file: <input type="text" size="15" name="a27">
                > ^!set %name_calc%=^$GetDocListAll("name==.*?;";"$0\r\n")$
              • John Wallace
                Thanks, Alec, that worked good enough. ... I tried something similar but couldn t get it to work. I didn t have the ? in the
                Message 7 of 7 , Jan 9, 2011
                  Thanks, Alec, that worked good enough.
                  :)

                  I tried something similar but couldn't get it to work.
                  I didn't have the ? in the GetDocListAll("name==.*?;";"$0\r\n")$

                  Thanks,
                  John


                  _____

                  From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Alec Burgess
                  Sent: Sunday, January 09, 2011 7:55 PM
                  To: ntb-clips@yahoogroups.com
                  Cc: Don
                  Subject: Re: [Clip] Replacement




                  Looks like Don and I were working on this at the same time but I don't
                  think (not tested) that Don's c lip satisfies the requirement that the
                  found test be removed from the original?

                  Here's mine with some comments:
                  ; <input type="text" name=="b27" = calc1($value,0.404686,0);size="15"
                  name="a27">
                  ; sep_file: name=="b27" = calc1($value,0.404686,0);
                  ; orig_file: <input type="text" size="15" name="a27">
                  ^!set %name_calc%=^$GetDocListAll("name==.*?;";"$0\r\n")$
                  ;^!info ^%name_calc%
                  ; strip %name_calc%
                  ^!replace "name==.*?;" >> "" rwais
                  ; put %name_calc% in a new file
                  ^!menu file/new
                  ^%name_calc%

                  Regards ... Alec (buralex@gmail& WinLiveMess - alec.m.burgess@skype)

                  On 2011-01-09 20:43, Don wrote:
                  >
                  > ^!SetListDelimiter ^P
                  > ^!Set %extract%=^$GetDocMatchAll(".*?(name.*;).*";1)$
                  > ^!ToolBar New Document
                  > ^!InsertText ^%extract%
                  >
                  > On 1/9/2011 8:01 PM, John Wallace wrote:
                  > > <tr>
                  > >
                  > > <td><input type="text" name=="b25" = calc1($value,43560,0);size="15"
                  > name="a25"></td>
                  > > <td align="center">acre-feet = cubic feet</td>
                  > > <td><input type="text" name=="a25" = calc2($value,43560,0);size="15"
                  > name="b25"></td>
                  > > </tr>
                  > > <tr>
                  > > <td><input type="text" name=="b26" =
                  > calc1($value,325851,0);size="15" name="a26"></td>
                  > > <td align="center">acre-feet = gallons</td>
                  > >
                  > > <td><input type="text" name=="a26" =
                  > calc2($value,325851,0);size="15" name="b26"></td>
                  > > </tr>
                  > > <tr>
                  > > <td><input type="text" name=="b27" =
                  > calc1($value,0.404686,0);size="15" name="a27"></td>
                  > > <td align="center">acres = hectares</td>
                  > > <td><input type="text" name=="a27" =
                  > calc2($value,0.404686,0);size="15" name="b27"></td>
                  > > </tr>
                  >
                  >

                  [Non-text portions of this message have been removed]






                  [Non-text portions of this message have been removed]
                Your message has been successfully submitted and would be delivered to recipients shortly.
                »
                «