473,396 Members | 1,849 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,396 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 1011
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.