1

In image-dired I use M-x image-dired-mark-tagged-files to mark files containing a tag using regexp. e.g. jan. The problem is that jane is marked as well.

What regex do I need to mark jan but not jane?

Input:

/foo/IMG_2022.JPG;jan
/foo/IMG_2023.JPG;jane

While jan\$ works in regexp-builder, it returns 0 results if used in M-x image-dired-mark-tagged-files

0

1 Answer 1

0

Try jan\b (in Lisp code, that's jan\\b).

That says to match jan when the n is on a word boundary.

2
  • Any ideas to match the tag bar but not not the tag foo bar? Tried \^bar. Will gladly open another question.
    – jjk
    May 3, 2022 at 6:05
  • 1
    One question per post, please. But you have to decide what exactly you want to exclude from matching before bar, and create a regexp that specifies that.
    – Drew
    May 3, 2022 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.