Monday 15 January 2018

How to check if my string matches with regex - Swift 3

I searched everywhere but it does not correspond to my
request.
How to check if a string matches with a regex ?
I
don't want to know if my string contains caracters or which
they are but I want to do a function which returns true or
false : does this string "abcdefgh" matches with
"[a-z]
".




I can do it in
PHP, JS but apparently in Swift all people want only to know which caracters matche.
^^



Regards,

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...