Article 5SPPP Difference between (regex)? and (regex)*

Difference between (regex)? and (regex)*

by
Faki
from LinuxQuestions.org on (#5SPPP)
I am going through bash regular expressions. Specifically the difference between

Code:(regex)?Match an optional regex

Code:(regex)*Match zero or more occurrences of a regex

Seems to me that essentially ? and * do the same thing.latest?d=yIl2AUoC8zA latest?i=BAG8xtHPPbs:zMbBypVMPSk:F7zBnMy latest?i=BAG8xtHPPbs:zMbBypVMPSk:V_sGLiP latest?d=qj6IDK7rITs latest?i=BAG8xtHPPbs:zMbBypVMPSk:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments