how to exclude strings regex

  • Автор темы Автор темы paydot
  • Дата начала Дата начала

paydot

Client
Регистрация
21.11.2012
Сообщения
56
Реакции
1
Баллы
8
Exclude a or b or c i use

[^abc]*?

work ok,

how to exclude strings regex

For example, to exclude the string abc

I used a Google search and someone said to use the following format
(?!^ABC$)
(?!^ABC$)(^.*$)
^((?!ABC).)*$

but after I use it, it still doesn't work.

(?<=<span\ class="^((?!abc).)*$">)[\w\W]*?(?=</td>)
 
What it should be excluded from?
Please give real example
 
What it should be excluded from?
Please give real example

<td align="center" class="Black">222</td>
<td align="center" class="White"> 3333</td>
<td align="center" class="Red"> 111 </td>
<td align="center" class="Yellow"> 888 </td>
<td align="center" class="Red"> 111 </td>
<td align="center" class="Black">222</td>
<td align="center" class="White"> 3333</td>
<td align="center" class="Red"> 777 </td>
<td align="center" class="Yellow"> 4444 </td>

Trying to rule out the Red.
 
(?<=<td\ align="center"\ class="[^Red]*?">)[\w\W]*?(?=</td>)
I replaced [^Red]*? with
(?!^Red$)
(?!^Red$)(^.*$)
^((?!Red).)*$
, but nothing worked.
 
Thanks, that's a very good idea!
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)