MikeMCSD
asked on
String manipulation help
I have a string that could contain any of the following:
newString = "joseph OR medal OR gold"
newString = "christopher OR medals"
newString = "medals"
newString = "medal"
I want to check "newString" for "medals" or "medal", then I want to replace
the "OR" with "AND" . . something like this:
If newString has "medals" or "medal" Then
Replace "OR" with "AND"
So the string "joseph OR medal OR gold" would be "joseph AND medal AND gold"
Also . . . If just the one word "medals" or "medal" is in the string (newString = "medals")
I want to Response.Redirect("default .aspx") . . like this:
If newString has ONLY "medal" or "medals"
Response.Redirect("default .aspx")
thanks
newString = "joseph OR medal OR gold"
newString = "christopher OR medals"
newString = "medals"
newString = "medal"
I want to check "newString" for "medals" or "medal", then I want to replace
the "OR" with "AND" . . something like this:
If newString has "medals" or "medal" Then
Replace "OR" with "AND"
So the string "joseph OR medal OR gold" would be "joseph AND medal AND gold"
Also . . . If just the one word "medals" or "medal" is in the string (newString = "medals")
I want to Response.Redirect("default
If newString has ONLY "medal" or "medals"
Response.Redirect("default
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.