I have a string say
my $str = 'click brick trick again';
Here is I'm trying something on this string
if ($str =~ /((?:[a-z]+ck\s*)+)(\s?again)/){
print "#$1#$2#\n";
}
which prints:
#click brick trick #again#
Now I want the space at start of $2. But it is captured in $1. What shall I do so that the space before again is captured in $1 while space is optional. Is there any way to do it? Is there any operator precedence that allow it?