No announcement yet.

Regular-expression alignment override problem?

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    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