how to parse out a http string from a string?

I have a string which might contain some http strings, how to parse them out?

For example, a string like following

“The site–>http://www.xyz.com?id=123&key=567, and it is very popular”

How to parse the string, so I can get three strings

-sPre: the texts before http url

-sLink: the http url itself (with all parameters)

-sPost: the texts after http url

Hi @joe16,

Please read these resources to get started:

http://docs.coronalabs.com/guide/data/luaString/index.html

http://www.coronalabs.com/blog/2013/04/16/lua-string-magic/

These should help you accomplish this task.

Take care,

Brent Sorrentino

Hi @joe16,

Please read these resources to get started:

http://docs.coronalabs.com/guide/data/luaString/index.html

http://www.coronalabs.com/blog/2013/04/16/lua-string-magic/

These should help you accomplish this task.

Take care,

Brent Sorrentino