I have a string like this: @\"10/04/2011\" and I want to save only the \"10\" in another string. How can I do that?
@\"10/04/2011\"
Swift 3.0 version
let arr = yourString.components(separatedBy: "/") let month = arr[0]