Home > Web Front-end > JS Tutorial > How to use replace() to replace mobile phone number with javascript regular expression_javascript skills

How to use replace() to replace mobile phone number with javascript regular expression_javascript skills

WBOY
Release: 2016-05-16 16:19:18
Original
1544 people have browsed it

The example in this article describes how to use replace() to replace mobile phone numbers with javascript regular expressions. Share it with everyone for your reference.

The specific implementation method is as follows:

Copy code The code is as follows:



Javascript regular expression uses replace() to replace mobile phone number






Replace the 4th to 7th digits of your mobile phone number with ****

Your mobile phone number is 13500112233
Little Pig’s mobile phone number is 13699887766
Big Bear’s mobile phone number is 13810102222





I hope this article will be helpful to everyone’s JavaScript programming design.

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template