Regular Expression File Search

How can I search for files matching a regular expression?

I found \OCP\Files\Folder->search(string)

Unfortunately, the file search query is undocumented in the documentation, and I can’t find how to do a regular expression search.

I need to find files that match the following expression (case insensitive):


I tried with search string next this works, it finds nextcloud-fles Nextcloud Manual.pdf and Nextcloud.mp4, but neither search string next* nor next.* find any files.

That’s my trial code, where $_['root'] is a OCP\Files\IRootFolder:

foreach ($_['root']->getUserFolder('admin')->search('next') as $path) {
  echo "→ ".$path->getName()."\n";

No response up to now? No idea? No one?