[regex] Regular expression: zero or more occurrences of optional character /

What is the regular expression pattern to say:

zero or more occurrences of the character /

?

This question is related to regex

The answer is


/*

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.