سؤال

for example, I have some feed, with an item title like this

Some text is better than one text http://t.co/blablabla #hashtag

then I want to get only the URL using regex like this

http://t.co/blablabla

how do i do that ?

هل كانت مفيدة؟

المحلول

You can use this regex:

http:\/\/t.co\/[^\s]+

http://regex101.com/r/pK6lW5

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top