CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 1/4/2005 10:39:33 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 34 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
rmprimo
Asp.Net User
multiple regex options syntax problem1/4/2005 10:39:33 PM

0/0


Regex r = new Regex("red", RegexOptions.Compiled & RegexOptions.IgnoreCase);
string s="red Blue Red Green red Orange Red Purple Red Yellow red"
MatchCollection mc = r.Matches(s);


problem when multiple regex options enumerated.

For example RegexOptions.IgnoreCase does not work. I only get the lower case matches. However if RegexOptions.IgnoreCase is the only option it does work. I am not looking for a workaround like convert both strings ToLower() but for the proper syntax to enumerate multiple regex options for more involved cases.

Can someone please help me figure out what I am doing wrong?

Thanks in advance

Rob
Regards,

Rob
Veni, vidi, v2.0
PLBlum
Asp.Net User
Re: multiple regex options syntax problem1/5/2005 4:53:08 PM

0/0

Ah C#. Just my thing. :)

Replace the & with |.
Regex r = new Regex("red", RegexOptions.Compiled | RegexOptions.IgnoreCase);

FYI: I'm not guessing here. I use this often with Regex.
--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com
bmains
Asp.Net User
Re: multiple regex options syntax problem1/5/2005 4:53:30 PM

0/0

Regex r = new Regex("[Rr]ed", RegexOptions.Compiled);

The issue is through the &'ing of terms.

Brian
Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
rmprimo
Asp.Net User
Re: multiple regex options syntax problem1/6/2005 9:42:18 PM

0/0

Thanks for replying,

My issue isn't the regex. I just used a simple example.

What I cannot figyure out is how to enumerate more than regex option as arguments?

Thanks

Rob


Regards,

Rob
Veni, vidi, v2.0
rmprimo
Asp.Net User
Re: multiple regex options syntax problem1/6/2005 9:51:59 PM

0/0

Worked like a charm. Thank you.
Regards,

Rob
Veni, vidi, v2.0
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Mastering Regular Expressions Authors: Jeffrey Friedl, Pages: 515, Published: 2006
Mastering Oracle SQL: Putting Oracle SQL to Work. Covers Oracle Database 10g Authors: Sanjay Mishra, Alan Beaulieu, Pages: 472, Published: 2004
Regular Expression Recipes for Windows Developers: A Problem-solution Approach Authors: Nathan A. Good, Pages: 359, Published: 2005
Learning the Bash Shell Authors: Cameron Newham, Bill Rosenblatt, Pages: 333, Published: 2005
Beginning Regular Expressions Authors: Andrew Watt, Pages: 768, Published: 2005
Compiler Construction: 8th International Conference, CC'99, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS'99, Amsterdam, The Netherlands, March 22-28, 1999 : Proceedings Authors: Stefan Jähnichen, Pages: 299, Published: 1999
JavaScript: The Definitive Guide Authors: David Flanagan, Pages: 994, Published: 2006
Learning the Korn Shell: Unix Programming Authors: Bill Rosenblatt, Arnold Robbins, Pages: 412, Published: 2002
Programming PHP Authors: Rasmus Lerdorf, Kevin Tatroe, Peter MacIntyre, Pages: 521, Published: 2006
Internetworking Troubleshooting Handbook: An Essential Reference for Solving Difficult Networking Problems Authors: Cisco Systems, Inc, Cisco Systems Inc, Pages: 1027, Published: 2001

Web:
Using multiple RegexOptions - .NET C# Using multiple RegexOptions. Get answers to your questions in our . ... syntax correct to make it happen. Does anyone know? Thanks. ...
Regular Expression Options The Syntax. The four options i, o, m and x are turned on by placing them after the ... readable by allowing you to put regular expression on multiple lines, ...
Etags Regexps - GNU Emacs Manual If you specify multiple ` --regex ' options, all of them are used in parallel. The syntax is: --regex=[ {language} ]/ tagregexp /[ nameregexp /] modifiers ...
Increase your knowledge of Regular Expression syntax Regular Expression options The RegEx engine supports a number of options that .... string will contain multiple matches to a particular Regular Expression. ...
Windower Plugin Wild Card & Regex Parser [Windower.net] Jan 29, 2008 ... Regex Format. Regex Options. Using Regex in Multiple Definitions ... Multiple Windower Plugins use a Wilcard syntax in them such as ...
Regular expression problem (PERL Syntax) Regular expression problem (PERL Syntax) Parse list and convert to HTML format. Garfield #:1245434, 11:15 am on Feb. 22, 2005 (utc 0) ...
Regexp Syntax Summary It has a variety of other options which modify the syntax slightly. ... They match any collating element (single or multiple characters) which has the same ...
Regular expression - Wikipedia, the free encyclopedia NET Framework, and the W3C's XML Schema all use regular expression syntax similar to Perl's. Some languages and tools such as PHP support multiple regular ...
Regex.Split Method (String, String, RegexOptions) (System.Text ... Text.RegularExpressions Assembly: System (in System.dll). Syntax ... However, when the regular expression pattern includes multiple sets of capturing ...
MailFaces - Option File Syntax Option Syntax. AudioSupport: Specifies whether Audio sounds are to be supported. ... Or it can be a Regular Expression. A Regular expression is specified by ...

Videos:
Developing JavaScript with Chickenfoot Google TechTalks July 25, 2006 Rob Miller Michael Bolin ABSTRACT Chickenfoot is a Firefox extension that embeds a JavaScript programming environmen...
django: Web Development for Perfectionists with Deadlines Google TechTalks April 26, 2006 Jacob Kaplan-Moss ABSTRACT Django is one of the premier web frameworks for Python, and is often compared to Ruby-on...




Search This Site:










can we use the sdk to create a company website

very newbie question on usps proxy authentication error 407

first sql configuration

error in register.aspx

uninstall problem

error while running project

connection problem

where are sqldataadapters closed?

problem installing ibuyspy delivery sample

syntax error in store procedure

installation

does the starter kit automate downloading products?

freaking forum, noone answers my question ! shut it down a** ho**s.

open source shopping cart

[fail] cannot add aspnet user

configuration error

checkout.aspx not working, customerid problem

will iis 4.0 work with this software?

why customerdetails and customersdb?

commerce kit for ms visual studio 2005?

unknown error 0x80005000

postback problem, (i think).

paypal features in commerce starter

how to add new products and where is the admin tool

commerce starter kid upgraded–free production site

paypal csk - mail problems

what files do i need to change

cant view commerce starter kit

just got it all working... but need a bit of help

exporting the sql db to a production sql server?

  Privacy | Contact Us
All Times Are GMT