Regular expression: zero or more occurrences of optional character /


Regex Problem Overview

What is the regular expression pattern to say:

> zero or more occurrences of the character /


Regex Solutions

Solution 1 - Regex


If your delimiters are slash-based, escape it:


* means "0 or more of the previous repeatable pattern", which can be a single character, a character class or a group.


All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPremView Question on Stackoverflow
Solution 1 - RegexJeff FerlandView Answer on Stackoverflow