qr{(?smx) \.? # Match the first instance of 0 or 1 one periods ( # then capture \S+ # one or more non whitespace characters ) } #### qr{(?smx) \. # Find a full stop (.*) # and capture everything after it } #### qr{(?smx) ^ # From the beginning (?: # In a group... [^.]* # Match any character except period, any number of times \. # followed by a period )? # math the group 0 or 1 times (.*) # then capture everything else }