Best google for regexp tutorial.

In general () is grouping, | is alternatives.

But that kind of search won't be fast.

MATCH (program:Program) WHERE program.genre =~ '(?i).*(*coo|coc|tail|ler*).*'
RETURN program.genre;

probably better to index your genre via lucene as fulltext index and then
use lucene query syntax to find your programs.

see: http://jexp.de/blog/2014/03/full-text-indexing-fts-in-neo4j-2-0/

On Tue, Dec 9, 2014 at 7:47 AM, Sukaant Chaudhary <
[email protected]> wrote:

> Hi,
> I've the following data:
>
> neo4j-sh (?)$ MATCH (program:Program) RETURN program.genre;
> ==> +-----------------------------+
> ==> | program.genre         |
> ==> +-----------------------------+
> ==> | "Coolers, Cocktail"  |
> ==> | "Baking"                 |
> ==> | "Savoury Dish"       |
> ==> +-----------------------------+
> ==> 3 rows
> ==> 1 ms
>
> Now, Please help me to modify the following query:
> MATCH (program:Program) WHERE program.genre =~ '(?i)coc.*' RETURN
> program.genre;
>
> such that,
>
>
>
> *if I'll put program.genre = coo / coc / tail/ lerit should return
> "Coolers, Cocktail"*
>
> *or if I put program.genre = Sav / Di / Dish / Savouryit should return
> "Savoury Dish"*
>
> -Sukaant Chaudhary
> <http://in.linkedin.com/pub/sukaant-chaudhary/33/ba8/479>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to