my $string = "a *test* b"; #### m/\b\s\*test\*\s\b/; or m/\*\btest\b\*/;