#!/usr/bin/perl use strict; use warnings; use encoding "cp852"; use utf8; my $a="aáaxBy"; $a =~ /(.*?)x(A*)y/;