p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 13th, 2007, 04:53 PM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Regex.IsMatch - receive a parsing error

I receive a parsing error on this line:
If Regex.IsMatch(TextBox1.Text, "[^a-zA-Z\d;.,':-/+ ]") Then

See error below, any advise?
-smc



Here is part of the error:

parsing "[^a-zA-Z\d;.,':-/+ ]" - [x-y] range in reverse order. Parameter name: [^a-zA-Z\d;.,':-/+ ]
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: parsing "[^a-zA-Z\d;.,':-/+ ]" - [x-y] range in reverse order. Parameter name: [^a-zA-Z\d;.,':-/+ ]


-smc
__________________
-smc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old June 14th, 2007, 01:21 AM
Friend of Wrox
Points: 1,446, Level: 15
Points: 1,446, Level: 15 Points: 1,446, Level: 15 Points: 1,446, Level: 15
Activity: 15%
Activity: 15% Activity: 15% Activity: 15%
 
Join Date: Sep 2005
Location: , , .
Posts: 419
Thanks: 0
Thanked 14 Times in 14 Posts
Default

smcirish

If you need to include '-' in your searh pattern include it as the first char

[^-a-zA-Z\d;.,':/+ ]

This should work

Else it considers :-/ as a range

Cheers
Shasur

http://www.vbadud.blogspot.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing HTML with Regex hugh@kmcnetwork.com VB How-To 0 February 5th, 2007 05:44 PM
JSTL XML parsing error pankajbrathi JSP Basics 1 August 29th, 2006 08:35 AM
Error in receive pipeline azmatazz Biztalk 0 April 28th, 2005 08:25 AM
RegEx Server.Create Object Error ckwizard77 Classic ASP Professional 1 September 2nd, 2004 04:04 PM
error in regex. sam PHP How-To 3 June 10th, 2003 04:19 AM



All times are GMT -4. The time now is 09:30 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc