I would like to replace recursively (in a project directory) the word 'javax' with 'jakarta'. That works for files ending in "java":
find . -name '*.java' | xargs sed -i 's/javax/jakarta/g'
I'd need to do the same also for XML files. To use a single command, I've tried modifying the find expression as follows:
find . -regex '^.*\.(java|xml)$'
However, no files are found. I've tried as well with:
find . -regex '.*/^.*\.(java|xml)$'
But still nothing. Can you help me to rewrite the finder expression to use multiple files suffixes? Thanks
-regextypethen you can choose which regex engine to use, now you're using-regextype posix-egrep