System.Data.SQLite
Check-in [343a18aca8]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Tighten up the regular expressions used to update the download page.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | preRelease
Files: files | file ages | folders
SHA1: 343a18aca8777a22a4eadb2691f4b7d7d6dc53bc
User & Date: mistachkin 2019-03-03 21:38:08
Context
2019-03-03
21:44
Another minor correction. check-in: 3429e51d53 user: mistachkin tags: preRelease
21:38
Tighten up the regular expressions used to update the download page. check-in: 343a18aca8 user: mistachkin tags: preRelease
21:04
Update master release archive manifest. check-in: be53ffd847 user: mistachkin tags: preRelease
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Setup/updateFileInfo.tcl.

    81     81       [string length $outputDirectory] == 0} then {
    82     82     set outputDirectory [file join $path Output]
    83     83   }
    84     84   
    85     85   #
    86     86   # NOTE: Setup the regular expression patterns with the necessary captures.
    87     87   #       These patterns are mostly non-greedy; however, at the end we need to
    88         -#       match exactly 40 hexadecimal characters.  In theory, in Tcl, this could
           88  +#       match exactly 40 hexadecimal characters.  In theory, in Tcl, this can
    89     89   #       have an undefined result due to the mixing of greedy and non-greedy
    90     90   #       quantifiers; however, in practice, this seems to work properly.  Also,
    91         -#       this pattern assumes a particular structure for the [HTML] file to be
           91  +#       these patterns assume a particular structure for the [HTML] file to be
    92     92   #       updated.
    93     93   #
    94     94   set pattern1 {<a\
    95         -    href=".*?/(.*?\.(?:exe|zip|nupkg))">.*?\((\d+?\.\d+?) MiB\).*?sha1:\
           95  +    href=".*?/([^"]*?\.(?:exe|zip|nupkg))">.*?\((\d+?\.\d+?) MiB\).*?sha1:\
    96     96       ([0-9A-F]{40})}
    97     97   
    98     98   set pattern2 {<a\
    99         -    href=".*?/package/.*?/\d+\.\d+\.\d+\.\d+">(.*?)</a>.*?\((\d+?\.\d+?)\
           99  +    href="[^"]*?/package/[^"]*?/\d+\.\d+\.\d+\.\d+">(.*?)</a>.*?\((\d+?\.\d+?)\
   100    100       MiB\).*?sha1: ([0-9A-F]{40})}
   101    101   
   102         -set pattern3 {href="/downloads/(.*?)"}
          102  +set pattern3 {href="/downloads/([^"]*?)"}
   103    103   set pattern4 {\(sha1: ([0-9A-F]{40})\)}
   104    104   set pattern5 {\((\d+?\.\d+?) MiB\)}
   105    105   
   106    106   #
   107    107   # NOTE: Grab all the data from the file to be updated.
   108    108   #
   109    109   set data [readFile $updateFileName]