I'm trying to read a MySpace FriendID out of a web page. If you view the source, you see this is multiple places: &friendID=12345& What's the simplest way to extract the FriendID and stick it in a variable? Is there a regex that would do this?
No.1 | | 431 bytes | |
Brian Dunning wrote: I'm trying to read a MySpace FriendID out of a web page. If you view the source, you see this is multiple places:
&friendID=12345&
What's the simplest way to extract the FriendID and stick it in a variable? Is there a regex that would do this?
Brian Dunning wrote: That did it, thanks! :) Keep in mind that if the ID is less than 5 digits, it won't match (I don't know where MySpace ID's start). You can change it to something like \d{1,} if you want it to match 1 or more digits.