Skip to content

Instantly share code, notes, and snippets.

@amonshiz
Created January 6, 2015 03:34
Show Gist options
  • Save amonshiz/b69b7249456b7b941b24 to your computer and use it in GitHub Desktop.
Save amonshiz/b69b7249456b7b941b24 to your computer and use it in GitHub Desktop.
let testText = "<a href=\"#\">Something</a>"
if let firstEndIndex = find(testText, ">") {
let testText2 = testText[Range<String.Index>(start: firstEndIndex.successor(), end: testText.endIndex)]
if let secondStartIndex = find(testText2, "<") {
let testText3 = testText2[Range<String.Index>(start: testText2.startIndex, end: secondStartIndex)]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment