string manipulation

  • Thread starter Thread starter mark
  • Start date Start date
M

mark

i have a string eg "John Doe" i need to manipulate the string to output "JD"
this easy to do ?

cheers

mark
 
Using regular expressions, you should be able to strip out all
Non-Capitolized letters from your string. Unfortunately, I'm not very good
at regular expressions or I'd give you an example.

Dave
 
David Young said:
Using regular expressions, you should be able to strip out all
Non-Capitolized letters from your string. Unfortunately, I'm not very good
at regular expressions or I'd give you an example.

Dave
sussed it with :-
'declare vars
Dim crap As String = "john doe"
Dim initial1, initial2 As String

'do the funky var stuff
Dim rarrar() As String = Split(crap)
initial1 = rarrar(0).Chars(0)
initial2 = rarrar(1).Chars(0)

cheers

mark
 
Back
Top