473,406 Members | 2,710 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,406 software developers and data experts.

Search and Replace using WildCards

I am trying to implement a "Find and Replace" dialog that allows using
wildcards in the find string, much like the Find and Replace Dialogs in Ms
Word, etc. Are there any references or examples on this. I have tried using
the Like comparision operator but about all I can do with it is replace a
whole string that contains the wildcard search string.

I want to do something like finding *mysea?rch in a string like "This is
mysearch string that I want to search" then replace with "NewString" such
that I get "NewString string that I want to search".
--
Dennis in Houston
Nov 21 '05 #1
2 5060
Hi,

Take a look at regex.replace

http://msdn.microsoft.com/library/de...placetopic.asp

Regular expression info
http://msdn.microsoft.com/library/de...xpressions.asp

http://www.regular-expressions.info/quickstart.html

Regular expression library
http://www.regexlib.com/

Ken
------------------------------

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:2F**********************************@microsof t.com...
I am trying to implement a "Find and Replace" dialog that allows using
wildcards in the find string, much like the Find and Replace Dialogs in Ms
Word, etc. Are there any references or examples on this. I have tried using
the Like comparision operator but about all I can do with it is replace a
whole string that contains the wildcard search string.

I want to do something like finding *mysea?rch in a string like "This is
mysearch string that I want to search" then replace with "NewString" such
that I get "NewString string that I want to search".
--
Dennis in Houston
Nov 21 '05 #2
Thanks Ken. I was, of course, aware of Regex Class but I had hoped not to
have to learn Regex language in depth but probably will have no choice but to
do so. I was hoping some kind programmer had posted some code that would use
the standard wildcards in some Search and Replace code.

"Ken Tucker [MVP]" wrote:
Hi,

Take a look at regex.replace

http://msdn.microsoft.com/library/de...placetopic.asp

Regular expression info
http://msdn.microsoft.com/library/de...xpressions.asp

http://www.regular-expressions.info/quickstart.html

Regular expression library
http://www.regexlib.com/

Ken
------------------------------

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:2F**********************************@microsof t.com...
I am trying to implement a "Find and Replace" dialog that allows using
wildcards in the find string, much like the Find and Replace Dialogs in Ms
Word, etc. Are there any references or examples on this. I have tried using
the Like comparision operator but about all I can do with it is replace a
whole string that contains the wildcard search string.

I want to do something like finding *mysea?rch in a string like "This is
mysearch string that I want to search" then replace with "NewString" such
that I get "NewString string that I want to search".
--
Dennis in Houston

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Case Nelson | last post by:
Hi there I've just been playing around with some python code and I've got a fun little optimization problem I could use some help with. Basically, the program needs to take in a random list of no...
22
by: Phlip | last post by:
C++ers: Here's an open ended STL question. What's the smarmiest most templated way to use <string>, <algorithms> etc. to turn this: " able search baker search charlie " into this: " able...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
1
by: JemPower | last post by:
Hi all, Can someone tell me if it's possible to search through a dataview based on a part-filter. For example, if I use... Dim dvAvailable = New DataView(dsRecipients.Tables("Available"),...
0
by: Anton | last post by:
Hi All, Is it possible to read through a word document, find a number of strings (using wildcards) and prompt the user to enter values for them. I have a document management database that builds...
4
by: | last post by:
Hello... i have a table which contains a column named "ask" and a column named "per"... my think is that i want to search in "ask" and echo the data stored in "per" for this entry... How do i do...
1
by: Nitinkcv | last post by:
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...
1
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and...
5
by: manish | last post by:
HI I want a jawascript that will search pages from only my subdomain website eg. abc.efg.com can anyone help me please give the exact jawascript as I am not an expert programmer please if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.