473,326 Members | 2,061 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,326 software developers and data experts.

How can I create a regexp which do that?

Hi!
I am a completly newbie to regexp and I would like to find a regular
expression which execute the following search:
"Show me all *Exception* since they are different from EOFException and

SocketException"
I tried [^EOF]Exception&[^Socket]Exception, but it didn't function like

I expected.
Does anyone have any clue?
Thanks in advance

Nov 8 '05 #1
5 1269
"jf*****@gmail.com" wrote:
I am a completly newbie to regexp and I would like to find a regular
expression which execute the following search:
"Show me all *Exception* since they are different from EOFException and
SocketException"

I tried [^EOF]Exception&[^Socket]Exception, but it didn't function like
I expected.

Does anyone have any clue?


Sheesh.

Did you make *any* effort to study regular expressions before you posted
here? No, I thought not. Try a search engine first. I found this site in
about 5 seconds: <http://www.regular-expressions.info/reference.html>

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

Nov 8 '05 #2
Thanks Sheesh.

I am also able to find websites like that (in fact I took a look on
several of them), but by reading it I couldn't find the answer(example)
I am looking for, maybe because I have never used regexp before.

Thanks any way!

Nov 8 '05 #3
Hi,

may be this help you:

<?php
preg_match_all("/(?<!EOF|Socket)Exception/s", "Show me all *Exception*
since they are different from EOFException and

SocketException", $matches);
print_r($matches);
?>

Nov 8 '05 #4
On Tue, 08 Nov 2005 14:21:03 +0200, <jf*****@gmail.com> wrote:
Hi!
I am a completly newbie to regexp and I would like to find a regular
expression which execute the following search:
"Show me all *Exception* since they are different from EOFException and

SocketException"
I tried [^EOF]Exception&[^Socket]Exception, but it didn't function like

I expected.
Does anyone have any clue?
Thanks in advance


preg_match_all("/((\w*)(?<!EOF|Socket)Exception)/U",$string,$mtch,PREG_SET_ORDER);

will find all "abcException", "Exception" except EOFException and
SocketException
--
---
Exact Meta Search | Major Search Engine
http://exactsearcher.com
Nov 8 '05 #5
Thanks to everybody!! :)

You guys were very nice!

Nov 8 '05 #6

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

Similar topics

3
by: zzzxtreme | last post by:
hello i have this function to check date (not mine) function (s_date) { // check format if (!re_dt.test(s_date)) return false; // check allowed ranges if (RegExp.$1 > 31 || RegExp.$2 > 12)...
0
by: Chris Croughton | last post by:
I'm trying to use the EXSLT regexp package from http://www.exslt.org/regexp/functions/match/index.html (specifically the match function) with the libxml xltproc (which supports EXSLT), but...
4
by: Jon Maz | last post by:
Hi All, I want to strip the accents off characters in a string so that, for example, the (Spanish) word "práctico" comes out as "practico" - but ignoring case, so that "PRÁCTICO" comes out as...
4
by: Jon Maz | last post by:
Hi All, I want to strip the accents off characters in a string so that, for example, the (Spanish) word "práctico" comes out as "practico" - but ignoring case, so that "PRÁCTICO" comes out as...
26
by: Matt Kruse | last post by:
Are there any current browsers that have Javascript support, but not RegExp support? For example, cell phone browsers, blackberrys, or other "minimal" browsers? I know that someone using Netscape...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.