iOS Question search in string

Ramezanpour

Active Member
Licensed User
Hi

I want to search in string.

this is my string : "This is test,hi how are you im fine thank you"

i want to search a text start with hi and end with you

Now I want to return : "hi how are you"
 

Ramezanpour

Active Member
Licensed User
"your string".substring2("your string".contains("search string"), "search string".size)
thanks
but again , No :(

I want to to download a url (I use httpjob and i use site source code)

source code is string.

and in this source code , there is a photo URL (example: http://b4x.com/test.jpg)

and i want to find this and download this and show in image view and save in album
 

narek adonts

Well-Known Member
Licensed User
you should create your expression to filter image url from string.
search on internet. maybe there is already a regex expression for this.
 

Ramezanpour

Active Member
Licensed User
Of course!

B4X:
    Dim im As String


im = "https://igcdn-photos-e-a.akamaihd.net/hphotos-ak-xaf1/t51.2885-15/11117017_1625492971005836_1706300614_n.jpg"

Dim mm As Matcher
mm = Regex.Matcher("https://.*(jpg|mp4)",im)

Do While mm.Find
Log ( mm.Match)



Loop

  
Loop
 
Top