473,382 Members | 1,421 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,382 software developers and data experts.

Strings

Is there a way of setting the string Wildcard to true for multiple scenarios
such as;

Dim Wildcard As String

If Wildcard = "This" And Wildcard = "That" Then

'Do stuff here

End If
Aug 8 '06 #1
6 1555
"Daniel N" <De******@yahoo.comschrieb:
Is there a way of setting the string Wildcard to true for multiple
scenarios such as;

Dim Wildcard As String

If Wildcard = "This" And Wildcard = "That" Then

'Do stuff here

End If

I recommend to describe what you want to archieve in more detail because
it's unclear what you understand by the term "wildcard". The code inside
the 'If' block shown above will never be executed because if the value of
'Wildcard' is "This", it cannot be equal to "That".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Aug 8 '06 #2
Essentially I want a string to be able to define multiple instances. Similar
to using the (*) while doing a search. I posted this in dotnet.general:

hWnd = FindWindow("CLASS NAME", *)
A string must be where the (*) is. Is there a way of making some kind of
wildcard so that function accepts every string instance?

To which someone replied;I should use the EnumWindows API along with the
GetClassName API.

But , after googleing I found
:http://www.vbaccelerator.com/home/vb...ws/article.asp
But still have no idea what do.


"Herfried K. Wagner [MVP]" <hi***************@gmx.atwrote in message
news:ew**************@TK2MSFTNGP04.phx.gbl...
"Daniel N" <De******@yahoo.comschrieb:
>Is there a way of setting the string Wildcard to true for multiple
scenarios such as;

Dim Wildcard As String

If Wildcard = "This" And Wildcard = "That" Then

'Do stuff here

End If


I recommend to describe what you want to archieve in more detail because
it's unclear what you understand by the term "wildcard". The code inside
the 'If' block shown above will never be executed because if the value of
'Wildcard' is "This", it cannot be equal to "That".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Aug 8 '06 #3
Daniel,

This answer from you we have seen now twice, but it does probably for
nobody describe what you want to doe.

As Herfried already wrote (in another way) in an earlier message. A string
can contain any collection of characters,

A string is nothing more than an address in memory with a certain lenght. In
the positions of that it is possible to set that collection of charecters
(unicode) which exist per character of two bytes.

A wildcard has nothing to do with that.

Cor

"Daniel N" <De******@yahoo.comschreef in bericht
news:XO*****************@fe12.lga...
Essentially I want a string to be able to define multiple instances.
Similar to using the (*) while doing a search. I posted this in
dotnet.general:

hWnd = FindWindow("CLASS NAME", *)
A string must be where the (*) is. Is there a way of making some kind of
wildcard so that function accepts every string instance?

To which someone replied;I should use the EnumWindows API along with the
GetClassName API.

But , after googleing I found
:http://www.vbaccelerator.com/home/vb...ws/article.asp
But still have no idea what do.


"Herfried K. Wagner [MVP]" <hi***************@gmx.atwrote in message
news:ew**************@TK2MSFTNGP04.phx.gbl...
>"Daniel N" <De******@yahoo.comschrieb:
>>Is there a way of setting the string Wildcard to true for multiple
scenarios such as;

Dim Wildcard As String

If Wildcard = "This" And Wildcard = "That" Then

'Do stuff here

End If


I recommend to describe what you want to archieve in more detail because
it's unclear what you understand by the term "wildcard". The code inside
the 'If' block shown above will never be executed because if the value of
'Wildcard' is "This", it cannot be equal to "That".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Aug 8 '06 #4
Perhaps he means comparing a string to a "template" provided by regular
expression
to see if it matches. In such a case, take a look at the "regex"
object.

-tom
Cor Ligthert [MVP] ha scritto:
Daniel,

This answer from you we have seen now twice, but it does probably for
nobody describe what you want to doe.

As Herfried already wrote (in another way) in an earlier message. A string
can contain any collection of characters,

A string is nothing more than an address in memory with a certain lenght. In
the positions of that it is possible to set that collection of charecters
(unicode) which exist per character of two bytes.

A wildcard has nothing to do with that.

Cor

"Daniel N" <De******@yahoo.comschreef in bericht
news:XO*****************@fe12.lga...
Essentially I want a string to be able to define multiple instances.
Similar to using the (*) while doing a search. I posted this in
dotnet.general:

hWnd = FindWindow("CLASS NAME", *)
A string must be where the (*) is. Is there a way of making some kind of
wildcard so that function accepts every string instance?

To which someone replied;I should use the EnumWindows API along with the
GetClassName API.

But , after googleing I found
:http://www.vbaccelerator.com/home/vb...ws/article.asp
But still have no idea what do.


"Herfried K. Wagner [MVP]" <hi***************@gmx.atwrote in message
news:ew**************@TK2MSFTNGP04.phx.gbl...
"Daniel N" <De******@yahoo.comschrieb:
Is there a way of setting the string Wildcard to true for multiple
scenarios such as;

Dim Wildcard As String

If Wildcard = "This" And Wildcard = "That" Then

'Do stuff here

End If
I recommend to describe what you want to archieve in more detail because
it's unclear what you understand by the term "wildcard". The code inside
the 'If' block shown above will never be executed because if the value of
'Wildcard' is "This", it cannot be equal to "That".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Aug 8 '06 #5
"Daniel N" <De******@yahoo.comschrieb:
Essentially I want a string to be able to define multiple instances.
Similar to using the (*) while doing a search. I posted this in
dotnet.general:

hWnd = FindWindow("CLASS NAME", *)
A string must be where the (*) is. Is there a way of making some kind of
wildcard so that function accepts every string instance?
You can simply pass 'Nothing' or 'vbNullString' to the second parameter to
find any window. However, I suggest to use 'EnumWindows' too:

<URL:http://groups.google.de/groups?q=dotnet+enumwindows+vb>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Aug 8 '06 #6
Baring regex, you can also achieve a like comparison with instring.

if string.instr(0,strTempValue,"this") >0 and
string.instr(0,strTempValue,"that") >0 then
'we have a this or that match
end if

regex might be a better way to go especially if you are searching for
something a pattern th?t or th?s where ? is the wildcard.

<to**************@uniroma1.itwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
Perhaps he means comparing a string to a "template" provided by regular
expression
to see if it matches. In such a case, take a look at the "regex"
object.

-tom
Cor Ligthert [MVP] ha scritto:
>Daniel,

This answer from you we have seen now twice, but it does probably for
nobody describe what you want to doe.

As Herfried already wrote (in another way) in an earlier message. A
string
can contain any collection of characters,

A string is nothing more than an address in memory with a certain lenght.
In
the positions of that it is possible to set that collection of charecters
(unicode) which exist per character of two bytes.

A wildcard has nothing to do with that.

Cor

"Daniel N" <De******@yahoo.comschreef in bericht
news:XO*****************@fe12.lga...
Essentially I want a string to be able to define multiple instances.
Similar to using the (*) while doing a search. I posted this in
dotnet.general:

hWnd = FindWindow("CLASS NAME", *)
A string must be where the (*) is. Is there a way of making some kind
of
wildcard so that function accepts every string instance?

To which someone replied;I should use the EnumWindows API along with
the
GetClassName API.

But , after googleing I found
:http://www.vbaccelerator.com/home/vb...ws/article.asp
But still have no idea what do.


"Herfried K. Wagner [MVP]" <hi***************@gmx.atwrote in message
news:ew**************@TK2MSFTNGP04.phx.gbl...
"Daniel N" <De******@yahoo.comschrieb:
Is there a way of setting the string Wildcard to true for multiple
scenarios such as;

Dim Wildcard As String

If Wildcard = "This" And Wildcard = "That" Then

'Do stuff here

End If
I recommend to describe what you want to archieve in more detail
because
it's unclear what you understand by the term "wildcard". The code
inside
the 'If' block shown above will never be executed because if the value
of
'Wildcard' is "This", it cannot be equal to "That".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Aug 8 '06 #7

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

Similar topics

20
by: Ravi | last post by:
Hi, I have about 200GB of data that I need to go through and extract the common first part of a line. Something like this. >>>a = "abcdefghijklmnopqrstuvwxyz" >>>b = "abcdefghijklmnopBHLHT"...
17
by: Gordon Airport | last post by:
Has anyone suggested introducing a mutable string type (yes, of course) and distinguishing them from standard strings by the quote type - single or double? As far as I know ' and " are currently...
16
by: Paul Prescod | last post by:
I skimmed the tutorial and something alarmed me. "Strings are a powerful data type in Prothon. Unlike many languages, they can be of unlimited size (constrained only by memory size) and can hold...
4
by: agent349 | last post by:
First off, I know arrays can't be compared directly (ie: if (arrary1 == array2)). However, I've been trying to compare two arrays using pointers with no success. Basically, I want to take three...
25
by: Rainmaker | last post by:
Hi, Can anyone tell me an efficient algorithm to sort an array of strings? Keep in mind that this array is HUGE and so the algorithm should me efficient enough to deal with it. Thanks
6
by: Broeisi | last post by:
Hello, I wrote the tiny progam below just to understand arrays and strings better. I have 2 questions about arrays and strings in C. 1. Why is it that when you want to assign a string to an...
2
by: Potiuper | last post by:
Question: Is it possible to use a char pointer array ( char *<name> ) to read an array of strings from a file in C? Given: code is written in ANSI C; I know the exact nature of the strings to be...
19
by: pkirk25 | last post by:
I wonder if anyone has time to write a small example program based on this data or to critique my own effort? A file called Realm List.html contains the following data: Bladefist-Horde...
95
by: hstagni | last post by:
Where can I find a library to created text-based windows applications? Im looking for a library that can make windows and buttons inside console.. Many old apps were make like this, i guess ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.