in reply to Re^2: Match Optional Groups with 1 Required Group
in thread Match Optional Groups with 1 Required Group

? is zero or one. You need *, which is 0 or more.:

print "$_: ", m[^\w+(?:\.\w+)*$] ? "matched\n" : "failed\n" for qw[ one one.two one.two.three four.five.six.seven one. one-tw +o ];; one: matched one.two: matched one.two.three: matched four.five.six.seven: matched one.: failed one-two: failed
Each title needs at least one character as well.

+ means 1 or more, so that's covered by \w+


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.