I have a file name let's say o example - Hello%@Im&an#Full-Stack+.Developer.pdf
I want to replace all the special characters from the file name with underscore _ and the result should be something like that.
Hello__Im_an_Full_Stack_Developer.pdf
Can anyone help me in making the regex for this task, my current regex is this [^\.\w]
没有评论:
发表评论