changeset 63:721bd7a04efb

bigger regexp building
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Thu, 14 Dec 2023 10:16:28 +0000
parents c82a8743fd48
children fff2fa031ed7
files repair.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/repair.py	Thu Dec 14 00:13:19 2023 +0000
+++ b/repair.py	Thu Dec 14 10:16:28 2023 +0000
@@ -102,10 +102,16 @@
 
  Comparison tool:
 
-   export P='\(nil\|(\(\([0-9]\+\|([^)]*)\) \?\)*)\)'
    paste <(cat shared) <(fgrep -f shared mail/alist.fixed | sed 's/ \([0-9]\) '"$P $P/ \1  \2      \5      /g" | cut -f 3)  <(fgrep -f shared gnus/alist.fixed | sed 's/ \([0-9]\) '"$P $P/ \1     \2      \5      /g" | cut -f 3) | { IFS='       ' ; while read gn g m; do if [ "$g" != "$m" ]; then printf "=----%s------\n%s\n%s\n" "$gn" "$g" "$m"; fi; done ; } | less
 
  Watch out for tabs!
  To look for overlap, change 2nd \n in printf to \t
 
+ export T=$'\t'
+export B1="(\(\([-0-9a-z]\+\|([^)]*)\) \?\)*)"
+export P1="\(nil\|$B1\)"
+export P2="\(nil\|\((\($B1 \?\)*)\)\)"  
+export M='\("[^"]*"\|(nndraft "")\)'
+
+  fgrep -f shared mail/alist.fixed | sed 's/ \([0-9]\) '"$P1 $P2 / \1     \2      \5      /;s/\(.*${T}.*${T}.*${T}\)$M /\1\2${T}/"
 '''