ios - Regular Expression for Numbers after KeyWord -


i have string "red:124green:45blue:23".

i have values red,green, blue.

the output pattern should 124 only, can assign value red string.

second output should 45,so can assign value green string , on..

red:(\d+)green:(\d+)blue:(\d+) 

you can used named groups:

red:(?<red>\d+)green:(?<green>\d+)blue:(?<blue>\d+) 

Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -