Discussion:
Rlike '\s' couldn't get the space
a***@yahoo.com
2018-11-12 11:02:02 UTC
Permalink
Dears,
I see that using '\s' can get the whitespace character in normal java regular expressions, but in HIVE I found it couldn't.
Why? And is there any other differences between the regular expressions in JAVA and HIVE?




Regards,
ËïÖŸÓí
Tanvi Thacker
2018-11-14 22:06:58 UTC
Permalink
Hi,

You need to use "*rlike '\\s' * to escape the single backslash.

Regards
Tanvi Thacker

On Mon, Nov 12, 2018 at 3:02 AM ***@yahoo.com <***@yahoo.com>
wrote:

> Dears,
> I see that using '\s' can get the whitespace character in normal java regular expressions,
> but in HIVE I found it couldn't.
> Why? And is there any other differences between the regular
> expressions in JAVA and HIVE?
>
>
> ------------------------------
> Regards,
> 孙志犹
>
孙志禹
2018-11-27 02:30:43 UTC
Permalink
It did help, thanks!



Regards,
ËïÖŸÓí

From: Tanvi Thacker
Date: 2018-11-15 06:06
To: user
Subject: Re: Rlike '\s' couldn't get the space
Hi,

You need to use "rlike '\\s' to escape the single backslash.

Regards
Tanvi Thacker

On Mon, Nov 12, 2018 at 3:02 AM ***@yahoo.com <***@yahoo.com> wrote:
Dears,
I see that using '\s' can get the whitespace character in normal java regular expressions, but in HIVE I found it couldn't.
Why? And is there any other differences between the regular expressions in JAVA and HIVE?




Regards,
ËïÖŸÓí
Loading...