- or download this
my $match = /#(\S*)/ ? $1 : "";
- or download this
/ ^ [^#]* \#? ( \S* ) /x;
say $1;
- or download this
/()/; /#(\S*)/;
say $1;
- or download this
/#(\S*)/ || /()/;
say $1;
- or download this
my $match = /#(\S*)/ ? $1 : "";
say $match;
- or download this
my $match = /#\K\S*/ ? $& : "";
say $match;
- or download this
my ( $match ) = /#(\S*)/;
say $match;
- or download this
my $match = /#(\S+)/ ? $1 : "";
say $match;
- or download this
my $match = /#(\w+)/ ? $1 : "";
say $match;
- or download this
/ ^ (?: (?! \#\S ). )* \#? ( \S* ) /x; # /#(\S+)/
say $1;
- or download this
/ ^ (?: (?! \#\w ). )* \#? ( \w* ) /x; # /#(\w+)/
say $1;