in your databases have many fields but one filed have data something like this: a1955ce0b318391b contain only a-z0-9 but some errors occurs while collect and store to database somehow that field contains null values or some dummy charracter how to filter which entry errors use this regex:
> select idvisitor from log where day = '2013-11-29' and idvisitor not rlike '^[a-z0-9]{16}$';
what does it means in hive?
rlike mean: regular expression like to use regex in hive query.
^ : from start of line
[a-z0-9] only contain a-z or 0-9 without order.
{16} contains exact 16 characters.
$ end of line.
It save my day.
:)
Hiển thị các bài đăng có nhãn regex. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn regex. Hiển thị tất cả bài đăng
Thứ Sáu, 29 tháng 11, 2013
Thứ Năm, 21 tháng 11, 2013
Using regular expression format your text
find pattern in text (this kind of regular expression can be use with text editor like notepad++ or sublime):
to find any pattern you want replace text with pattern : ^.*pattern.*$
to find any blank line ^.\n
meaning of each character maybe in next post.
or can use sed command in linux box for search pattern:
sed '/^.*object.*$/d' ./filename.txt : this command will print all line NOT include "object" (without quote) of filename.txt in the terminal.
or say: sed '/^.*object.*$/d' ./filename.txt >> newformatedtext.txt
:)
to find any pattern you want replace text with pattern : ^.*pattern.*$
to find any blank line ^.\n
meaning of each character maybe in next post.
or can use sed command in linux box for search pattern:
sed '/^.*object.*$/d' ./filename.txt : this command will print all line NOT include "object" (without quote) of filename.txt in the terminal.
or say: sed '/^.*object.*$/d' ./filename.txt >> newformatedtext.txt
:)
Đăng ký:
Bài đăng (Atom)