

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Match any string containing zero or more p's.
To match any string containing zero or more p’s with JavaScript RegExp, use the p* Quantifier.
Example
You can try to run the following code to match any string containing zero or more p’s. Here, p is considered as a number of occurrences −
<html> <head> <title>JavaScript Regular Expression</title> </head> <body> <script> var myStr = "Welcome! Wweeeelcome to our website!"; var reg = /el*/g; var match = myStr.match(reg); document.write(match); </script> </body> </html>
- Related Questions & Answers
- Match any string containing one or more p's with JavaScript RegExp.
- Match any string containing a sequence of N p's
- Match any string containing a sequence of two to three p's.
- Match any string containing a sequence of at least two p's.
- Match any string containing at most one p.
- Match any string with p at the end of it.
- Match any string with p at the beginning of it.
- What is more important in today's world qualification or soft skills?
- MySQL pattern matching 3 or more “a's” in name?
- Can 'false' match some string in MySQL?
- What's the Kotlin equivalent of Java's String[]?
- How to get the largest of zero or more numbers in JavaScript?
- How to get the smallest of zero or more numbers in JavaScript?
- Do any browsers yet support HTML5's checkValidity() method?
- How to make any Django model's file downloadable?
Advertisements