I am currently making an app that sends data to an Algorithmia algorithm where it is processed. A response of where to find the file is then sent back to the app in this form:
Optional({
output = "data://.algo/deeplearning/AlgorithmName/temp/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.png";})
I need a way to extract the randomly generated 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.png' section of the response. It needs to be stored in a string which I will use later.
- Programming language: Swift 3
- Device: iOS
- Library in use: Algorithmia (https://algorithmia.com) (https://github.com/algorithmiaio/algorithmia-swift)
Final code:
imageFileName is storing the final file name for later use. The begining part of the output string is also being cut off.