[twitter-dev] Re: How to pattern-match these crazy shortened URLs?

2009-07-17 Thread Kevin Mesiab
In js, this seems to work: var x = /(?:http://)*(w{0,3}\.?\w+\.\w{2,3}[/\w]*)/gim var p = '$1'; str.replace( x, p ); On Fri, Jul 17, 2009 at 7:06 PM, Kevin Mesiab wrote: > Code commented w/ "don't ask" is immediately suspect :P > > > On Fri, Jul 17, 2009 at 6:43 PM, ferodynamics wrote: > >

[twitter-dev] Re: How to pattern-match these crazy shortened URLs?

2009-07-17 Thread Kevin Mesiab
Code commented w/ "don't ask" is immediately suspect :P On Fri, Jul 17, 2009 at 6:43 PM, ferodynamics wrote: > > I go cross-eyed when it comes to reading this stuff. I hacked some > code I found, catches "bit.ly" but not (for example) "ff.im" > > (Can I post code here?) > > function urls2li