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

Re: [Clip] Help with RegExp

Expand Messages
  • Lee Underwood
    Alec, This works except it includes the entire rest of the portion (making it all bold). Here is a sample of what I have to change (portions to be changed are
    Message 1 of 12 , Jan 8, 2007
      Alec,

      This works except it includes the entire rest of the portion (making
      it all bold). Here is a sample of what I have to change (portions to
      be changed are in red):

      <strong>Title:</strong> <a name="Credit_Card_Number_Validation"
      href="http://javascript.internet.com/forms/credit-card-number-validation.html">Credit
      Card Number Validation</a><br><strong>Contributor:</strong> David
      Leppek</a> <br><strong>Contributor URL:</strong> <a
      href="https://www.azcode.com/Mod10">https://www.azcode.com/Mod10</a><br><strong>Details:</strong>
      4.97 KB * Uploaded November 7
      2005<br><strong>Description:</strong> Determine if a credit card
      number could be valid before submitting it for real-time online
      authentication. Based on ANSI X4.13, the LUHN formula, aka the Mod 10
      algorithm is used to validate accurate credit card numbers. Heavily
      commented.</p><p class="listingalign" align="right">[ <a
      href="http://javascript.internet.com/forms/credit-card-number-validation.html#source">Get
      Source Code</a> ]
      <hr noshade size="2">


      Here is what I want to change it to:


      <strong>Title:</strong> <a name="Credit_Card_Number_Validation"
      href="http://javascript.internet.com/forms/credit-card-number-validation.html">Credit
      Card Number Validation</a><br><strong>Contributor:</strong> David
      Leppek</a> <br><strong>Contributor URL:</strong> <a
      href="https://www.azcode.com/Mod10">https://www.azcode.com/Mod10</a><br><strong>Date
      Uploaded:</strong> November 7 2005<br><strong>Description:</strong>
      Determine if a credit card number could be valid before submitting it
      for real-time online authentication. Based on ANSI X4.13, the LUHN
      formula, aka the Mod 10 algorithm is used to validate accurate credit
      card numbers. Heavily commented.</p>
      <hr noshade size="2">



      I hope that a bit more clearer. I tried changing yours but I haven't
      a clue. Once I get this done I'm jumping in full-speed into RegEx.
      It's kind of like when I was a kid and learning math, it took a bit
      and then, bam! I got it!

      Thanks for your help.

      Lee



      On 1/4/2007 08:49 PM, Alec Burgess wrote:
      ........................................................

      >Sheri,Lee: It looks like Thunderbird was munging what I sent (I think
      >recognizing the strong tag in angle brackets and trying to "help" by
      >putting the asterisks around them (the normal way to signal emphasis
      >when sending text email) (underlines similarly are used to mark
      >underlines and slashes to mark italics)
      >
      >In any case, I'm sending this from the yahoo-groups web interface in
      >Firefox 2. Sorry for all the confusion Lee. Here's what I intended to
      >send originally (hope it comes through OK):
      >
      >======= (one line)
      >^!replace "<strong>Details:</strong>.*\*(.*)" >> "<strong>Date
      >$1:</strong>" rwasi
      >======= (end one line)
      >There are only three asterisks in the above, a dot-star, a back-slash
      >star and another dot_star in parentheses!
      >
      ........................................................

      [Non-text portions of this message have been removed]
    • Sheri
      Try it this way: ^!Replace (?s)( .*?)Details:.*?( ).+?(Uploaded) $1Date $3$2 RAWS0 can also be written so it defaults to Ungreedy to
      Message 2 of 12 , Jan 8, 2007
        Try it this way:

        ^!Replace "(?s)(<strong>.*?)Details:.*?(</strong>).+?(Uploaded)" >>
        "$1Date $3$2" RAWS0

        can also be written so it defaults to Ungreedy to avoid needing the
        question marks:

        ^!Replace "(?sU)(<strong>.*)Details:.*(</strong>).+(Uploaded)" >>
        "$1Date $3$2" RAWS0

        Regards,
        Sheri
      • Lee Underwood
        Sheri, Thanks! That works great! I was also able to adapt it for another change. I ll take a dissect it to get a better understanding. Thanks again. Lee On
        Message 3 of 12 , Jan 9, 2007
          Sheri,

          Thanks! That works great! I was also able to adapt it for another
          change. I'll take a dissect it to get a better understanding.

          Thanks again.

          Lee




          On 1/8/2007 06:55 PM, Sheri wrote:
          ........................................................

          >Try it this way:
          >
          >^!Replace "(?s)(<strong>.*?)Details:.*?(</strong>).+?(Uploaded)" >>
          >"$1Date $3$2" RAWS0
          >
          >can also be written so it defaults to Ungreedy to avoid needing the
          >question marks:
          >
          >^!Replace "(?sU)(<strong>.*)Details:.*(</strong>).+(Uploaded)" >>
          >"$1Date $3$2" RAWS0
          >
          >Regards,
          >Sheri
          ........................................................
        Your message has been successfully submitted and would be delivered to recipients shortly.