my $str = "1. ...... AB_CD 1.1 ...... EF_GH 1.2 .... IJ_KL_MN 2. ..... +....... OPQR"; my( undef, %chap ) = split /\s*(\d+\.\d*)\s*\.+\s*/, $str;
Works.
- tye
In reply to Re: Convert string to data structure (split)
by tye
in thread Convert string to data structure
by Dirk80
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |