Regex in Swift matching single quotes does not find matches
06:32 13 Dec 2020

I am using this regex in my Swift,

    let regex = try! NSRegularExpression(pattern: "^[a-zA-Zåçêëèïîìæôöòûùÿáíóúñ]+(?:[-' ][a-zA-Zåçêëèïîìæôöòûùÿáíóúñ]+)*$")
    let range = NSRange(location: 0, length: newValue.utf16.count)
    
    if regex.firstMatch(in: value, options: [], range: range) == nil {
        print("Not passed")
    } { 
        print("Passed") 
    }

but it gives different result from the website https://regex101.com/r/EXWsK1/2, what am i doing wrong here?

In my swift code, it should accept the aposthropes character such as Le'brahm, O'Niel, etc like the example on the website, but it does not.

swift regex iphone validation