View Single Post
Old 05-05-2012, 09:28 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,241
bash regex or sed help

never done regex in bash before, what im bascially trying to do is this perl/php regex

/(\d+)_\d+_\d+[_a-z]*\.jpg/i

what is gets is the facebook profile id, from a facebook image.

http://a1.sphotos.ak.fbcdn.net/hphot...20 4038_n.jpg

would get 80329313253

in php

preg_match('/(\d+)_\d+_\d+[_a-z]*\.jpg/i',$url,$matches);

match[1] would be the fb id
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote