string manipulation

M

mark

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

cheers

mark
 
D

David Young

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
 
M

mark

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top