1

Topic: regexp_like

As it is possible to select lines which do not begin with "ns".
The upcoming version does not work
regexp_like (text, ' ^ [^ (ns)] ')

2

Re: regexp_like

RTFM Logical Conditions (FAQ)

3

Re: regexp_like

Swso,

select * from (
select ' nsll ' str from dual
union
select ' kkns ' from dual) where
instr (str, ' ns')> 1

4

Re: regexp_like

123;

SQL> ed
Wrote file afiedt.buf
1 select * from (
2 select ' nsll ' str from dual
3 union
4 select ' kkns ' from dual
5 union
==> 6 select ' Oh! ' from dual
7) where
8* instr (str, ' ns')> 1
SQL> /
STR
----
kkns

....
stax

5

Re: regexp_like

Stax;
For you on a saucer with gold  instr (str, ' ns')! = 1

6

Re: regexp_like

Stax;
null you can consider?

7

Re: regexp_like

Surprisingly, it is so much answers and all not in a subject)
I will ask once again, the indirect packet accepts the regular expressions and the given condition on an input goes among many.

8

Re: regexp_like

Swsov wrote:

it is surprising, so much answers and all not in a subject)
I will ask once again, the indirect packet accepts the regular expressions and the given condition on an input goes among many.

NOT regexp_like does not accept?
.....
stax

9

Re: regexp_like

Stax;
No, regexp_like in indirect procedure.
Everything that it is possible to change this expression

10

Re: regexp_like

Swsov wrote:

the indirect packet accepts on an input the regular expressions

I Give : begins not with n or begins with n, and proceeds not with s.

11

Re: regexp_like

Swsov wrote:

Is not present, regexp_like in indirect procedure.
Everything that it is possible to change this expression

RTFM

12

Re: regexp_like

Elic;
Yes to bypass not a problem, it is interesting to me why in this case oracle does not consider (ns) as the whole expression

13

Re: regexp_like

Swsov wrote:

Stax;
No, regexp_like in indirect procedure.
Everything that it is possible to change this expression

Knew a method through tonsils, but to you  probably does not approach
Line to replace with one character,  regexp_like (replace (nvl (str, ' * '), ' ns', ' # '), ' ^ [^#] ')
...
stax

14

Re: regexp_like

Stax;

select * from (
select ' nsll ' str from dual
union
select ' kkns ' from dual
union
select ' Oh! ' from dual
) where
regexp_like (str, ' ^ [^ (?:ns)] ')

15

Re: regexp_like

Swsov wrote:

it is interesting to me why in this case oracle does not consider (ns) as the whole expression

RTFM POSIX Operators in Oracle SQL Regular Expressions: (Non) Matching Character List (FAQ) : "In the list, all operators except these are treated as literals: ..."

16

Re: regexp_like

feagor;

SQL> ed
Wrote file afiedt.buf
1 select * from (
2 select ' nskk ' str from dual
3 union
==> 4 select ':nskk? ' str from dual
5 union
==> 6 select ' naskk? ' str from dual
7 union
8 select ' kkns ' from dual
9 union
10 select ' Oh! ' from dual
11 union
12 select "from dual
13) where
14* regexp_like (str, ' ^ [^ (?:ns)] ')
SQL> /
STR
------
kkns
Oh!

.....
stax

17

Re: regexp_like

WITH
TMain AS (SELECT ' nsaaa ' as str
FROM DUAL
UNION ALL
SELECT ' ns123'
FROM DUAL
UNION ALL
SELECT ' aaans'
FROM DUAL
UNION ALL
SELECT ' 123ns'
FROM DUAL
UNION ALL
SELECT ' ans'
FROM DUAL
UNION ALL
SELECT ' 1ns'
FROM DUAL
UNION ALL
SELECT ' n1s'
FROM DUAL)
SELECT *
FROM TMain
WHERE regexp_like (str, ' ^ ([^n]) | ([n] [^s]) ')

18

Re: regexp_like

feagor;

union all
select ' sn ' from dual

19

Re: regexp_like

Elic;
However there all the same it is not described that in this case will not work described in the same place subexpression

20

Re: regexp_like

IMNO;
For two characters a hogwash (Elik described),
And here for a line  not  on select
.....
stax

21

Re: regexp_like

Swsov wrote:

However there all the same it is not described that in this case will not work described in the same place subexpression

Undress eyes.

22

Re: regexp_like

IMNO wrote:

' ^ ([^n]) | ([n] [^s])'

You not completely translated . [spoiler]

' nsgggggng'

[/spoiler]

23

Re: regexp_like

stax;
select * from (
select ' nskk ' str from dual
union
select ':nskk? ' str from dual
union
select ' naskk? ' str from dual
union
select ' kkns ' from dual
union
select ' Oh! ' from dual
) where
regexp_like (str, ' ^ ((n [^s]) | ([^n])) ')

24

Re: regexp_like

stax;
I continue to believe, what when  it will be possible so ^ (?! ns)

25

Re: regexp_like

not like ' ns %'

still nobody offered?