This is a discussion on Help with JS function within the JavaScript Programming forums, part of the Programming & Scripting category; Help! I'm no javascript programmer, but sometimes it can't be avoided. I'd willingly try to figure this out, but I'm ...
| |||||||
|
#1
| ||||
| ||||
| Help! I'm no javascript programmer, but sometimes it can't be avoided. I'd willingly try to figure this out, but I'm on deadline. I need a statement or two that will remove any character from a string that is NOT a capital letter or a number; thus: Code: O'HARA-SMITH_JANE_Q1 would become OHARASMITH_JANE_Q1 Mega cudos in advance.
__________________ Wolffy ------------------------ Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Rework for your specific environment may be required. Void where prohibited by law. Not valid in California. Your mileage may vary. |
|
#2
| ||||
| ||||
| OK - so I had to crack open my almost untouched JavaScript reference, but found what I was looking for. For the lurkers who might be looking for an answer like this, I coded: Code: urlBox.value = urlText.replace(/[^\w\d_]*/gi, "") |
| The Following User Says Thank You to Wolffy For This Useful Post: | ||
jmurrayhead (June 9th, 2009) | ||
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using InStr Function | todd2006 | ASP Development | 2 | April 24th, 2009 09:59 AM |
| calling function | guddu | ASP Development | 3 | November 5th, 2008 09:34 AM |
| [Functions] Help using function | Rebelle | ASP Development | 11 | October 13th, 2008 12:13 PM |
| ASP 2 way encryption function | dr_rock | ASP Development | 2 | August 14th, 2008 08:01 AM |
| without function | guddu | Microsoft SQL Server | 1 | July 15th, 2008 04:02 PM |