Kyle R. Burton on 28 Oct 2011 08:15:05 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [Philadelphia-pm] Perl one liner, regex capture group problem |
> command: curl -so- http://www.wikihow.com/Make-Easy-Homemade-Biscuits|perl > -nE "say $1 if /src='(\S+(?:png|jpg))'/" > abbreviated output: Stan, You may just be hitting shell replacement since the expression is in double quotes - try backslashing the $1: ... perl -nE "say \$1 if /src='(\S+(?:png|jpg))'/" HTH, Kyle -- Twitter: @kyleburton Blog: http://asymmetrical-view.com/ Fun: http://snapclean.me/ _______________________________________________ Philadelphia-pm mailing list Philadelphia-pm@pm.org http://mail.pm.org/mailman/listinfo/philadelphia-pm