Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Location
    Seattle
    Posts
    12

    Default Regular-expression alignment override problem?

    I have one directory with filenames in the format Last, First.jpg and another directory with filenames in the format First Last.jpg. I wish to compare these two directories. I have established an alignment override using the regular expressions
    ^(.+), (.+)\.jpg$
    ^$2 $1\.jpg$

    but the directory-compare continues to put all the filenames on separate lines, aligning none of them. However, it does work if I leave the anchors off the second regex; to wit:
    $2 $1\.jpg

    Additionally, if I try to match Last, First.jpg with First Last optional garbage.jpg using
    ^(.+), (.+)\.jpg$
    $2 $1.*\.jpg

    it drops back to not aligning anything.

    Are these bugs, or as-intended behavior? Or is my regex knowledge slipping because I've been retired too long?
    Bret Sutton
    COBOL dinosaur

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    2,529

    Default

    The "with right file (or folder)" edit is not a regular expression, it's a substitution mask. It, combined with the left filename and original regular expression, are used to generate a resulting right filename, which we look for to try aligning. The filenames on the right are never used as an input.
    ZoŽ P Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •