G
Guest
Hi,
Does anyone knows any good code for string manipulation similar to
RegularExpresion?
I might get a value as string in a different format. Example:
20/02/2006 or 20,02,2006 or 20.02.2006 etc...
And I want to replace the /,.etc character with - (as 20-02-2006)
The VB.NET replace operation can replace single character at a time. What I
need is similar to RegularExpresion that I might code a sinle line as:
Dim mySTR as String = ""
mySTR = CStr(TableTAK.Rows(i))
Dim myCurDate as String = ""
myCurDate = mySTR.xReplace("/,.", "-")
The function that I need (xReplace) will replace any character "/,." in
mySTR with character "-".
The xReplace function might allow me to assign any character that I want to
replace. Not just 3 character that I desribe in above.
I know I have to create a function to do but I am looking for much faster
way doing that like in RegularExpresion.
I thank you in advance for reading my post.
Rgds,
GC
Does anyone knows any good code for string manipulation similar to
RegularExpresion?
I might get a value as string in a different format. Example:
20/02/2006 or 20,02,2006 or 20.02.2006 etc...
And I want to replace the /,.etc character with - (as 20-02-2006)
The VB.NET replace operation can replace single character at a time. What I
need is similar to RegularExpresion that I might code a sinle line as:
Dim mySTR as String = ""
mySTR = CStr(TableTAK.Rows(i))
Dim myCurDate as String = ""
myCurDate = mySTR.xReplace("/,.", "-")
The function that I need (xReplace) will replace any character "/,." in
mySTR with character "-".
The xReplace function might allow me to assign any character that I want to
replace. Not just 3 character that I desribe in above.
I know I have to create a function to do but I am looking for much faster
way doing that like in RegularExpresion.
I thank you in advance for reading my post.
Rgds,
GC