Home  >  Article  >  Web Front-end  >  Use regular expressions to get the name of a file with a specified path_javascript skills

Use regular expressions to get the name of a file with a specified path_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:18:241129browse

The main ones involve "" special characters in javascript. Do we need to use regular expressions
<script> <br>var m="D:Picture Beggar Gang.jpg" <br>//Solve it <br></script>
The value you hope to get is "Beggars"

Copy the code The code is as follows:


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn