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

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -