itinfo7
asked on
Loop thorugh string in .net
I have
string like this
string mystring = This is the %EventName% and place is %ShelterName%
I want to seperate the %EventName% ,%shelterName% as seperate string.
I am not sure how I can loop thorugh string and get the position of %.Please Help me out with this.
string like this
string mystring = This is the %EventName% and place is %ShelterName%
I want to seperate the %EventName% ,%shelterName% as seperate string.
I am not sure how I can loop thorugh string and get the position of %.Please Help me out with this.
ASKER
string parsestring = VCA is the %Animal% Hospital and It's located %texas%
ASKER
Actually string is changeable but it would follow same format I am giving you.
This requires a little more code than I can do over my phone, but the following example should give you everything you need to get the variables you want.
Extract a value between two spaces in a string
Extract a value between two spaces in a string
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you post a sample, I may be able to write the parse statement for you.