.
is a wildcard which occurs once.
*
is zero or more times, will also return more than one character between foo
and bar
.
+
is one or more times, will return also more than one character that is between foo
and bar
.
the pattern “foo.bar
” will present any single character between foo
and bar
.
the pattern “foo.*bar
” will return also the string that has no character in between foo
and bar
Pattern “foo.bar
”
['fooabar', 'fooxbar', 'foocbar']
Pattern “foo.*bar
”
['fooabar', 'fooxbar', 'foobar', 'fooxybar', 'foocbar']
Pattern “foo.+bar
”
['fooabar', 'fooxbar', 'fooxybar', 'foocbar']