First, if you would use <c></c> around your data, it would be easier for others to read and understand. At the moment, I can't tell if the data is all on one line or multiple lines in your file.
The untested code below should give a start in the right direction. As for how to apply that regex to processing the file, you'll need to provide more information of the format of the file contents.
use strict; use warnings; my $data = "name: ka-lvscluco;" $data =~ m/:\s+(.+?);/; my $extracted = $1; print "'$extracted' was pulled from '$data'\n";
In reply to Re: pattern matching
by dasgar
in thread pattern matching
by changalrai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |