Test, validate and match regular expressions
This regular expression validates filenames intended for download requests, specifically supporting English and Persian or Arabic characters. It ensures the filename begins with a valid alphanumeric, underscore, hyphen, or Persian character, followed by one or more of these characters or spaces, and ending with a standard alphanumeric file extension. It is case-insensitive and ideal for multilingual file handling in web applications.