Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / May 2008

Tip: Looking for answers? Try searching our database.

Regex Wildcard

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
per_persson_2008@yahoo.com - 12 May 2008 08:25 GMT
I use .* as a wildcard match in my regular expression. But how do I
write it if I want to match all characters except the following <>
and /
Leo Seccia - 12 May 2008 08:39 GMT
try [^<>/]

>I use .* as a wildcard match in my regular expression. But how do I
> write it if I want to match all characters except the following <>
> and /
per_persson_2008@yahoo.com - 12 May 2008 09:16 GMT
> try [^<>/]
>
[quoted text clipped - 7 lines]
>
> - Visa citerad text -

Hi, I stil have problems. For example ^.*kalle.*$ matches the
following string a<bckalleabc. If I use the following ^.*[^<>/]kalle.*
$ I get the same result.
Paul E Collins - 12 May 2008 09:23 GMT
> Hi, I stil have problems. For example ^.*kalle.*$ matches the
> following string a<bckalleabc. If I use the following
> ^.*[^<>/]kalle.*$ I get the same result.

The dot means "any character", and the star means "any number of these",
so you need to replace the dot with [^<>/]  and not just stick it in at
random.

^[^<>/]*kalle[^<>/]*$

[^<>/]* means "any number of characters that aren't < > /

Eq.
per_persson_2008@yahoo.com - 12 May 2008 09:40 GMT
On 12 Maj, 10:23, "Paul E Collins" <find_my_real_addr...@CL4.org>
wrote:
> <per_persson_2...@yahoo.com> wrote:
> > Hi, I stil have problems. For example ^.*kalle.*$ matches the
[quoted text clipped - 10 lines]
>
> Eq.

Thanks for the answer. Yes it works if I replace . with [^<>/]*
DSK Chakravarthy - 12 May 2008 14:40 GMT
Dude ..

Try searching at regexlib.com. this is the first place for every and any
regular expressions. This is a place where you can both learn as well as use
expressions by others.

HTH

>I use .* as a wildcard match in my regular expression. But how do I
> write it if I want to match all characters except the following <>
> and /

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.