Range of a regular expression match ignoring case and diacritics in Swift
<p>I am trying to figure out how to find a range of a regular expression match in a string. The search needs to be both case and diacritics insensitive. I've tried using something like this:</p>

<pre><code>"München".rangeOfString(
    "[mno][tuv][mno]",
    options: [
        .RegularExpressionSearch,
        .DiacriticInsensitiveSearch,
        .CaseInsensitiveSearch],
    range: nil,
    locale: nil)
</code></pre>

<p>but it looks like <code>.RegularExpressionSearch</code> doesn't work along with <code>.DiacriticInsensitiveSearch</code>.</p>

<hr>

<p>I've tried using the <code>stringByFolding</code> method to transform the string before the search. The problem with this method is that it transforms <code>ß</code> into <code>ss</code>, thus changing the length of the string and potentially invalidating the result range.</p>