How can I use regex in a migration query condition?
I was able to use REGEXP operator in a normal condition() method, although it is not stated in the documentation.

The answer was found on this example.

Solution:

  public function query() {
    return $this-&gt;select('data_table', 'd')
      -&gt;distinct()
      -&gt;fields('d', ['ID', 'Data'])
      -&gt;condition('Data', '"image":"\d*[^&gt;"]', 'REGEXP');
  }