Improved regex for import