473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Removing wild cards from search string

Hi,

I have a textbox and a button. In my textbox i have to enter the query string(say shoes) and on clicking the button takes me to a page show all item related to the search string( in this case shoes). But on mixing the search string with wildcards it displays that no items could be found. For eg: for search string s@h^o$e@s it would go to the error page.



So is there ant way i could like extract the wildcards out of my search string and onlly get the required word. so if search string entered is s@h^o$e@s then it should remove all the wild card and extract the word 'shoes' from s@h^o$e@s and pass it on.



Thanks,

Nitin
Apr 11 '07 #1
1 1837
mrhoo
428 256MB
searchstring=searchstring.replace(/[\W]/g,'');
will remove everything except letters, the underscore and digits from the string.
Apr 11 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steve T | last post by:
I have just contracted with a firm that is using a front-end web interface to access our sales data. They developed it with Microsoft Dotnet, and it uses Microsoft SQL as the database. When I...
2
by: Paweł | last post by:
Hello! I'm looking for efficient code or site where I can find code for finding one string in another string. String which I search should have "wild" characters like '?' for any one char and...
3
by: topmind | last post by:
I need to search for database text with underlines in it. However, underlines are interpreted as wild-cards in LIKE clause text . I need to know how to escape the underlines so as to be able to...
4
by: Karl Seguin | last post by:
Some of our users behind firewalls (watchguard in particular) are reporting that they can't access our site. This is the type of error they are getting: 02/06/04 07:27 http-proxy: removing...
11
by: Andy Chan | last post by:
First of all, thanks to Crirus and Fergus for helping me with a related posted a few days ago. Ok, I can add images to my form (for whatever reason I cannot added more than 1 image within the...
4
by: SatishPasala | last post by:
hi I am tring to remove all the wild characters from a string. Is there any short method to remove them in a single go. I am right now tring to replace one by one. Ex (999) 999-9999 I...
1
by: panchaga | last post by:
Hi, could any one help me with this select statement. i am using as part of JSP page. i want to use wild cards as part of this select. i am getting error when i use % along with the name. ...
8
by: garyrowell | last post by:
I have been at this programme for hours trying to work out what is wrong. Any help would be very much appricated. Here is the breif I received. The program This week you are going to write three...
7
by: W. eWatson | last post by:
Is it possible to do a search for a wild card string in another string. For example, I'd like to find "v*.dat" in a string called bingo. v must be matched against only the first character in bingo,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.