
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
Match any string containing one or more p's with JavaScript RegExp.
To match any string containing one 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 one 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 = "Secure and Responsive!"; var reg = /s+/g; var match = myStr.match(reg); document.write(match); </script> </body> </html>
- Related Articles
- Match any string containing zero or more p's.
- Match any string containing at most one p.
- 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 with p at the end of it.
- Match any string with p at the beginning of it.
- JavaScript RegExp s Metacharacter
- How to increment one or more counters with JavaScript?
- Match the items in Column I with one or more items of Column II.
- Match the items in column A with one or more items in column B.
- With JavaScript RegExp how to search a string for text that matches regexp?
- Match column I with column II. There can be more than one match.
- Match the items given in Column I with one or more items of Column II.
- Find word character in a string with JavaScript RegExp?

Advertisements