Subject: | In extract_bracketed, please include at least one example where there is no whitespace preceeding the bracket |
I have been trying without success to extract the bracketed text from a string where there is no whitespace before the opening bracket. I can not figure out from the examples in the POD of how to extract the brackets from the script below.
#!/usr/bin/perl
use strict;
use warnings FATAL => qw( all );
use Text::Balanced qw(extract_bracketed);
use Data::Dumper;
my $text = 'A line with B<bold>, I<italic>, and B<I<bold and italic>> text.';
my @line = extract_bracketed( $text, '<..>' );
print Dumper(\@line);
The result I get is...
$VAR1 = [
undef,
'A line with B<bold>, I<italic>, and B<I<bold and italic>> text.',
undef
];
Nothing was extracted, I'm guessing because there is no whitespace before the first bracket. Without an example I am lost.
Lady Aleena
PS. The list of uppercase characters and whole words before the bracket I want to extract for additional munging are: A ABBR ACRONYM B BIG CITE CODE DFN EM I KBD Q SAMP SMALL SPAN STRONG SUB SUP TT VAR.