1

Topic: Search Email in the text - how to eliminate the specific provider.

Good afternoon. The task following, it is necessary to implement search in the text email.
I identify presence email thus:
[spoiler]

SELECT D.DOC_ID
FROM DOCUMENTS d, DOC_TEXTS dt
WHERE D.DOC_ID = DT.DOC_DOC_ID
AND REGEXP_LIKE (DT.TEXT, '\w + [a-zA-Z _] +?. [a-zA-Z] {2,6} ')

[/spoiler]
But how to write the following construction which eliminates presence of a certain mask in the text, for example:
1. If there is in the text type "soap" aaa@ bigmir.net , search successful
2. If there is in the text type "soap" aaa@ mail.ru , search unsuccessful
3. If there is in the text type "soap" aaa@ mail.ru and aaa@ bigmir.net , search successful.
I.e. it is necessary to eliminate documents in which there is a sheaf several email or email distinct from the provider mail.ru from search.

2

Re: Search Email in the text - how to eliminate the specific provider.

trace.log,

3

Re: Search Email in the text - how to eliminate the specific provider.

To add REGEXP_COUNT?

4

Re: Search Email in the text - how to eliminate the specific provider.

trace.log, RTFM AND, OR, NOT and ()

5

Re: Search Email in the text - how to eliminate the specific provider.

ma1tus wrote:

to add REGEXP_COUNT?

To me it is necessary not to count kol-in emai in the document, and to cut one request what do not satisfy to a condition.

6

Re: Search Email in the text - how to eliminate the specific provider.

ma1tus wrote:

to add REGEXP_COUNT?

Besides at me 10r2 the version.

7

Re: Search Email in the text - how to eliminate the specific provider.

To make table EMAILS (TEXT_ID, USER, DOMAIN).
And then to use request: select TEXT_ID from EMAILS where DOMAIN! = ' mail.ru ' group by TEXT_ID

8

Re: Search Email in the text - how to eliminate the specific provider.

Yes in where it is possible... But here, yes - superfluous; council Elic .

9

Re: Search Email in the text - how to eliminate the specific provider.

I incorrectly expressed.
But how to write the following construction which eliminates presence of a certain mask in the text, for example:
1. If there is in the text type "soap" aaa@bigmir.net, search successful
2. If there is in the text type "soap" aaa@mail.ru, search unsuccessful
3. If there is in the text type "soap" aaa@mail.ru and aaa@bigmir.net, search successful.
I.e. it is necessary to eliminate documents in which there is a sheaf several email or email distinct from mail.ru from search.
I.e. it is necessary to eliminate documents in which meets email from the provider mail.ru from search.
text, DOC_ID
@1, 1
@2, 2
@1 ' @2, 3
On an output it is necessary to receive values:
text, DOC_ID
@1, 1
@1 ' @2, 3

10

Re: Search Email in the text - how to eliminate the specific provider.

trace.log wrote:

3. If there is in the text type "soap" aaa@mail.ru and aaa@bigmir.net, search successful.
I.e. it is necessary to eliminate documents in which there is a sheaf several email or email distinct from mail.ru from search.
I.e. it is necessary to eliminate documents in which meets email from the provider mail.ru from search.

the Updated requirement contradicts triple.

trace.log wrote:

On an output it is necessary to receive values:

it is Enough to implement unit.
You are not able to make logical expressions at all?

11

Re: Search Email in the text - how to eliminate the specific provider.

trace.log;

where instr (replace (text, ' @mail.ru '), ' ')> 0

12

Re: Search Email in the text - how to eliminate the specific provider.

123 wrote:

trace.log;

where instr (replace (text, ' @mail.ru '), ' ')> 0

Thanks though some and did not understand that it was necessary to make

13

Re: Search Email in the text - how to eliminate the specific provider.

trace.log wrote:

though some and did not understand, what it was necessary to make

It you itself so muffled  named?

14

Re: Search Email in the text - how to eliminate the specific provider.

Elic wrote:

it is passed...
It you of so muffled  named?

It I to that someone understood, and someone of too high judgement on, therefore nothing to consider more and your message is explicit to other case.

15

Re: Search Email in the text - how to eliminate the specific provider.

trace.log wrote:

and someone of too high judgement on

In a mirror looked?