title: Groovy Regex: What does a tilde in a character class do?
body: <p>I've got this Regex that comes out of a groovy code:</p>
  
  <pre><code>(?:[^\p{Alnum}äöü**~D~V~\~_**]|^)
  
  (?:sometext|s\.t\.)
  
  (?:[^\p{Alnum}äöü**~D~V~\~_**]|$$)
  </code></pre>
  
  <p>The only thing I do not understand is this part:</p>
  
  <pre><code>**~D~V~\~_**
  </code></pre>
  
  <p>What doas the tilde do in there? Is that an error? Or just some switch for the character class?</p>
  
  <p>My understanding is that the first and the third line do match word boundries, while the second matches the text in question (in long and short form).</p>
  
  <p>I tried googling this (and searched here of course) but unfortunatly the tile belongs to the "match this" operator in groovy, so all I found here and there were was general information on how to regex something.</p>