Basitçe aşağıda ki şekilde yapabilirsin.

https://www.regextester.com/?fam=104769

Kaynak:
https://www.perlmonks.org/bare/?node_id=389776