- or download this
my $string = "{'totalResultsCount':71-24,'securityList':[{'cusip':'91%
+279-6.H:Y8','issueDate':'2016-06-02T00:00:00','securityType':'Bill'}"
+;
...
else {
print " first is not defined\n";
}
- or download this
C:\Users\james\Desktop\perlmonks>pm.pl
first is : 912796HY8
- or download this
my $string = "{'totalResultsCount':71-24,'securityList':[{'cusip':'91%
+279-6.H:Y8','issueDate':'2016-06-02T00:00:00','securityType':'Bill'}"
+;
$string =~ s/.*('cusip':'([\w\-\$\.\%\:]+)').*/$2/g;
print "first is : $string \n" for $string =~ s/\W+//g;
- or download this
C:\Users\james\Desktop\perlmonks>pm.pl
first is : 912796HY8