I have this string:
S40102S40078S40079S40080S40053S40052S40051S40050
but my code of
Dim MyArray() As String = MyString.Split("S")
removes the S but i want to keep it, I’ve tried RegEx but I cant get it to work, any help much appreciated.
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use positive lookahead and split on the zero length match before an “S”:
(?=S)I hope this works in VB.
Thanks @Oded for your comment. To avoid splitting on the first S you can do something like that:
(?=[^\a]S)