473,386 Members | 1,864 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,386 software developers and data experts.

Is there a metacharacter to match transitions between any two of aset of non intersected char classes?

Hi,

'\b' only match the boundary between alphanumerical char and
nonalphanumerical char. I'm wonder if there is a generic metacharacter
to match the boundary between any non intersected char set defined in
regex and its complement.

For example, I have a few non intersected char sets [a-zA-Z_0-9], [:]
and [\s], and lets call the new metacharactor \m.

r"abc\m" would be the same as r"abc\b"
r"abc:\m' would match "abc:" in r"abc:xy" but not "abc::xy"
r"a \m" (with one space) would match "a " (with one space) in "a abc"
but not "a abc" (with two spaces).

I would like that I have the flexibility to define more non
intersected char sets, while I don't want change the regex that I have
written.

Thanks,
Peng
Jul 24 '08 #1
1 984
On Jul 24, 6:48*pm, Peng Yu <PengYu...@gmail.comwrote:
Hi,

'\b' only match the boundary between alphanumerical char and
nonalphanumerical char. I'm wonder if there is a generic metacharacter
to match the boundary between any non intersected char set defined in
regex and its complement.

For example, I have a few non intersected char sets [a-zA-Z_0-9], [:]
and [\s], and lets call the new metacharactor \m.

r"abc\m" would be the same as r"abc\b"
r"abc:\m' would match "abc:" in r"abc:xy" but not "abc::xy"
r"a \m" (with one space) would match "a " (with one space) in "a abc"
but not "a *abc" (with two spaces).

I would like that I have the flexibility to define more non
intersected char sets, while I don't want change the regex that I have
written.
Interesting idea. It could be added, but how much demand is there for
it?
Jul 25 '08 #2

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

Similar topics

9
by: Ron Adam | last post by:
Is it possible to match a string to regular expression pattern instead of the other way around? For example, instead of finding a match within a string, I want to find out, (pass or fail), if...
1
by: epigram | last post by:
I'm creating a series of web pages that I will display sequentially in IE 6 (for an internal application). I'd like to have nice transitions between them. The only thing I have found thus far are...
2
by: Tom | last post by:
I'm getting this error when I try to pass a structure to a dll. An unhandled exception of type 'System.ArgumentException' occured in Test1.exe Additional Information: Type could not be marshaled...
1
by: Dan | last post by:
Hi, I was wondering if anyone could come up with a cross browser image transition that I could use... I have already made one that works in IE but i know it doesn't work in Mozilla Firefox. ...
2
by: jmprince01 | last post by:
in C, write a function which will find the first occurance of the string s in the string str and will return a pointer to the first match if such a match occurs. if there is no match, then...
10
by: somebody | last post by:
There are two files below named search.c and search.h. In the for loop in search.c, the for loop never exits, even if mystruct.field1 has no match. Instead of exiting the for loop it keeps going...
3
by: igbt | last post by:
I am creating a simple script which is using gtk. In this script you must enter a text, if you do not enter anything or you enter a dot, the script will be finished. However, if you don't enter...
25
by: Adam01 | last post by:
Hi, I've been working on a message system using threading: class console { private: HANDLE OutThread; char * out; bool Loopflag; void MessageLoop(void *){
5
by: Ebucel | last post by:
I need to create a screensaver that detects the resolution of one or 2 monitors and then selects the correct picture for that resolution and then uses transitions to make it like a slideshow with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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,...

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.