How to capture the first letter in a not-repeating string ?

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
hackoo
Posts: 103
Joined: Sat Jan 22, 2011 12:27 am

How to capture the first letter in a not-repeating string ?

Post by hackoo » Mon Sep 23, 2013 6:52 pm

Hi ;)
I want to create a function for capturing the first letter in a not-repeating string
For example if have this :
MyString = "aabbccddMffrryx"
So the first letter will be retuned as M
So i'm looking for the best and the easy way to do it in vbscript.
So i ask you how can i do this function (Method)
Thank you !

User avatar
jvierra
Posts: 13725
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: How to capture the first letter in a not-repeating strin

Post by jvierra » Mon Sep 23, 2013 7:47 pm

You would use RegEx to do this.

Start here for a tutorial on this subject: http://www.regular-expressions.info/

Locked