Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 13th, 2007, 03:53 PM
Registered User
 
Join Date: Jun 2007
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
 
Old June 14th, 2007, 12:21 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 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





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 07:35 AM
Error in receive pipeline azmatazz Biztalk 0 April 28th, 2005 07:25 AM
RegEx Server.Create Object Error ckwizard77 Classic ASP Professional 1 September 2nd, 2004 03:04 PM
error in regex. sam PHP How-To 3 June 10th, 2003 03:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.