Search code examples
orientdborientdb2.2

Does OrientDb support regular expressions?


I'm running OrientDb 2.2.6 using a plocal connection. I'm translating from one domain specific query language to OrientDb SQL. Since I need to translate a like command that allows regular expressions, I'd like to pass a regular expression similar to

[Ss]ay.*

but it looks like OrientDb 2.2 only supports the wild card '%'. Can Orient handle a regular expression like the one above? If not, do I need to create a custom function? Maybe there's an object in Orient's API that I can use instead?


Solution

  • you can use something like

    Select from v where name MATCHES "<regex>"
    

    link1

    link2