Using Version 14.0 beta (14A5228q) on Monterey 12.4
I am trying to follow the 'Meet Swift regex' presentation dated 7 June but I have stumbled on the most basic of errors that I cannot get around.
At 3:56 in the video, the following line of code is shown
let transaction = "DEBIT 03/05/2022 Doug's Dugout Dogs $33.27"
let fragments = transaction.split(separator: /\s{2,}|\t/)
// ["DEBIT", "03/05/2022", "Doug's Dugout Dogs", "$33.27"]``
The '/' of the separator string generates the error:
- error: cannot convert value of type 'Regex' to expected argument type 'String.Element' (aka 'Character')
I am embarrassed but also stuck on the simple issue and I cannot figure out what I am missing.
TIA
Chris