2013/8/2 Noel Grandin <[email protected]>:
>
> On 2013-08-02 14:27, Cecil Westerhof wrote:
>>
>> I had to search for an article containing fish. Just using LIKE
>> '%fish%' resulted in much to many. So I used '% fish %', but did not
>> find, what I knew existed. Turns out fish was at the end of he
>> sentence and I found it with '% fish%'.
>>
>> Is there a way to search for whole words?
>>
>
> H2 supports REGEX which is similar to LIKE except that you can use the full
> regular expression matching syntax.
> See java.util.regex.Pattern for the syntax.

Works like a charm, thanks.

I am now using:
    REGEXP ' [Ff]ish[ .,]'

It can start at the beginning of the line and stop at the end. So I
would like to use something like:
    REGEXP '[ ^][Ff]ish[ .,$]'

But that does not work. Is what I want possible?

And I properly should add some other characters like: ;, :, … But for
the moment it is good enough.

-- 
Cecil Westerhof

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to