Windows 10, Emacs 25.1, Dired+, xah-find

I use package xah-find for find/replace text in many files. OK. It's work. If I want to find in all java files I use the next regexp:

File path regex: \.java\'

OK. It's work. But if I want in files with the next extensions:

 .java, .xml, .properties

What regexp must be? '

1 Answer 1


xah-find uses emacs regular expressions (regexps).

Regexps support the or operator with \|. The elisp regexp \.java\|\.xml matches .java OR .xml. Furthermore there are \( and \) for grouping. Therefore you could choose \.\(java\|xml\|properties\)\' as regexp for your special use case.

Side note: If for any reason saving the subexpression of the group has to be avoided one can also use a silent group \.\(?:java\|xml\|properties\)\'.

Your Answer

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

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