title: Regex match any word followed by a number (but the word can contain special characters like diacritics or accents)
body: <p>I have a regex function that takes a string and matches any word followed by a comma and a year.</p>
  <pre class="lang-js prettyprint-override"><code>function getAuthorFromTitle(title) {
    var regexForauthor = /(?&lt;author&gt;\w+(?=, \d+))/gs;
    var resultRegEx = regexForauthor.exec(title);
    var author = resultRegEx !== null ? resultRegEx.groups.author : &quot;0000000000&quot;;
    return author;
  }
  </code></pre>
  <p>This works great for titles containing English characters, but if I have any Diacritics or Accents the script returns null.</p>
  <pre><code>console.log(&quot;This works&quot;, getAuthorFromTitle(&quot;Robert Bresson, 1951&quot;));
  console.log(&quot;This does not work&quot;, getAuthorFromTitle(&quot;Kornél Mundruczó, 2014&quot;));
  </code></pre>
  <p>Any idea on how to match words that include Diacritics or Accents?</p>
  <p>If you want to fiddle with the code please check out this Codepen: <a href="https://codepen.io/anything/pen/XWjwgea?editors=1011" rel="nofollow noreferrer">https://codepen.io/anything/pen/XWjwgea?editors=1011</a></p>