Support

Akeeba Backup for Joomla!

#20076 Regex to exclude all files starting with dot

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Wednesday, 14 May 2014 15:57 CDT

joomlaboy
Hello...
I am struggling to find a way to exclude all files that are hidden and starting with ._ (dot & underscore eg: ._index.html.

My current site has numerous of such files, and want to backup without them.
Can you suggest something ?

nicholas
Akeeba Staff
Manager
Of course. You can se the regex
#^\._#
which matches anything that starts with a dot and underscore.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomlaboy
Hello Nicholas,

this is what actually worked for me : [\._]

Have a great day!

nicholas
Akeeba Staff
Manager
Your regex will skip every file which contains a dot OR an underscore in the filename. It doesn't match files whose name begins with ._

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomlaboy
Yes, you are right. This regex will match everything with ._
But #^\._# doesn't work, nor the [^\._]

nicholas
Akeeba Staff
Manager
You can try this one:
#(^\.|/\.)_#

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomlaboy
Thanks Nicholas - this one seems to be working.

nicholas
Akeeba Staff
Manager
You're welcome!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!