Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regular expression: zero or more occurrences of optional character /

Tags:

regex

What is the regular expression pattern to say:

zero or more occurrences of the character /

?

like image 521
Prem Avatar asked Nov 29 '10 13:11

Prem


Video Answer


1 Answers

/* 

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.

like image 141
Jeff Ferland Avatar answered Sep 28 '22 03:09

Jeff Ferland