Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 December 3rd, 2003, 07:27 AM
Registered User
 
Join Date: Oct 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to lukemedway_uk
Default regular expression pattern...

Hi, simple question really, i need a regular expression pattern that will remove all symbols such as... +-=)(*&^%$£"!

But I also need to retain the underscore as it's for a username... Any help would be greatly appreciated. :)




 
Old December 3rd, 2003, 11:14 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

try this: [\+-=\)\(\*&^%$£"!]

This will match any of those characters. Note the escaping of certain chars. Depending on what you are using the REGEX in (javascript/asp/?) you might need to escape additional chars.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression Help Please rstelma ASP.NET 1.0 and 1.1 Professional 0 January 2nd, 2008 07:01 PM
Regular expression to select non-matching pattern Neuron BOOK: Beginning Regular Expressions 1 June 12th, 2006 10:06 AM
regular expression vohra_vikas2004 ADO.NET 3 November 18th, 2004 09:59 PM
Regular expression help!!! alex_read Javascript 4 August 18th, 2004 03:44 AM
Regular Expression Help Hadware .NET Web Services 3 November 4th, 2003 10:51 AM





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