473,395 Members | 1,383 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

RegularExpretion for negation of expression?

High ALL,

in MSDN for .NET is the following:

[^aeiou] Matches any single character not in the specified set of
characters.

Is it possible to constract Regular Expression that will do something like
this:

^<EXPR> Matches any expression (sequence of symbols)
does not equal the given <EXPR> ??

E.g., for part of HTML code
"<td...>.....<td...>....</td>....</td>"
RegExp "<td[^>]*>.*?</td>"
matches HTML-code from the "outer TD"-"opening tag" till "inner TD"-"closing
tag". But I want to get the inner complete TD only.
Will be appretiate for any help.
Thanx
Evgeny
Nov 22 '05 #1
1 1010
Negative lookahead/lookbehind does (kind of) what you want.

Niki
"Evgeny Zoldin" <zo****@hotmail.com> wrote in
news:%2****************@TK2MSFTNGP12.phx.gbl...
High ALL,

in MSDN for .NET is the following:

[^aeiou] Matches any single character not in the specified set of
characters.

Is it possible to constract Regular Expression that will do something like
this:

^<EXPR> Matches any expression (sequence of symbols)
does not equal the given <EXPR> ??

E.g., for part of HTML code
"<td...>.....<td...>....</td>....</td>"
RegExp "<td[^>]*>.*?</td>"
matches HTML-code from the "outer TD"-"opening tag" till "inner TD"-"closing tag". But I want to get the inner complete TD only.
Will be appretiate for any help.
Thanx
Evgeny

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Evgeny Zoldin | last post by:
High ALL, in MSDN for .NET is the following: Matches any single character not in the specified set of characters. Is it possible to constract Regular Expression that will do something...
17
by: joshc | last post by:
I searched through the newsgroup for this and found the answer but wanted to make sure because of something that came up. I want the absolute value of a 'short int' so to avoid the dangers of...
6
by: Shiraz | last post by:
Me and my colleagues have been working on a problem since yesterday and can’t seem to find a solution to it. It relates in a good measure to iterators and the way we’re using them in our...
15
by: Mark Rae | last post by:
Hi, I'm trying to construct a RegEx pattern which will validate a string so that it can contain: only the numerical characters from 0 to 9 i.e. no decimal points, negative signs, exponentials...
3
by: crescent_au | last post by:
Hi all, I've been trying unsuccessfully to get the text from html page. Html tag that I'm interested in looks like this: <a class=link...
8
by: fredo | last post by:
This question was asked in comp.lang.javascript with no result. In IE5.x and IE6, I want to display an image when the user rolls over a text link. The image does indeed display, but only on the...
5
by: Gigs_ | last post by:
Can someone explain me bitwise expression? few examples for every expression will be nice x << y Left shift x >y Right shift x & y Bitwise AND x | y Bitwise OR x ^ y Bitwise XOR (exclusive...
1
by: Gert Cuykens | last post by:
rex2=re.compile('^"(?P<value>*)"$',re.M) File "/usr/lib/python2.5/re.py", line 180, in compile return _compile(pattern, flags) File "/usr/lib/python2.5/re.py", line 233, in _compile raise...
6
by: sk.rasheedfarhan | last post by:
Hi , I am using regular expression in C++ code, . Negation is not working in the down loaded code. matches all characters except "a", "b", and "c] So I am in dilemma can negation work in C++...
12
by: AAaron123 | last post by:
I want to search my .vb files for lines that do not contain an underline followed by Menu. I tried .*Menu as a regular expression but I guess that must mean that it must contain a character that...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.