Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


How to write script pattern for this case?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,32617
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to write script pattern for this case?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 How to write script pattern for this case? - 3/24/2006 1:32:05 AM   
  zbx888

 

Posts: 4
Score: 0
Joined: 1/24/2006
Status: offline
Hi,

How do I write one vb script pattern function to replace all special characters (< > "  ' % ; ) ( & +, - #)  to empty string for one input parameter?

Thanks a lot!
 
 
Post #: 1
 
 RE: How to write script pattern for this case? - 3/24/2006 1:50:05 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
I'm not sure what you mean by "for one input parameter", but this pattern should match the characters you listed:

oRE.Pattern = "[<>""'%;\$\+,\-#]"

Here is an example:

      

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to zbx888)
 
 
Post #: 2
 
 RE: How to write script pattern for this case? - 3/24/2006 2:21:50 AM   
  zbx888

 

Posts: 4
Score: 0
Joined: 1/24/2006
Status: offline
Thanks a lot! That works for me.

(in reply to ebgreen)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to write script pattern for this case? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts