Question: My first post here and it "obviously" has to be about regexp (the nightmare of all beginner devs)

I have a string: `s = "Shadowborn Apostle \r\nCreature — Human Cleric \r\nA deck can have any number Of \r\ncards named Shadowborn Apostle. \r\ne, Sacrifice six creatures named \r\nShadowborn Apostle: Search your \r\nlibrary for a Demon creature card \r\nand put it onto the battlefield. Then \r\nshuffle your library. \r\n"`

I would like to extract only this part `Shadowborn Apostle(space)`

I use .match to get the substring I want: `s.match(/^[^\\]+/)`

Unfortunately, MatchData = the whole string. And I'm not sure why. Any help would be appreciated.

Thanks!

Answer: 
I solved this issue by adding additional headers to my custom Alamofire session manager:

```
static let sessionManager: Alamofire.SessionManager = {
        let config = URLSessionConfiguration.default
        config.timeoutIntervalForRequest = 10
        config.timeoutIntervalForResource = 10
        config.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders

        return Alamofire.SessionManager(configuration: config) 
}()

```

Hope this helps!
Most probably your SessionManager was deallocated, cancelling any ongoing requests. try to assign the session manager instance to a property.

check
<https://github.com/Alamofire/Alamofire/issues/1684>