L Lonedon Member Licensed User Longtime User May 28, 2013 #1 Is there a function or method like VB's "split": split("a|b|c","|")
IanMc Well-Known Member Licensed User Longtime User May 28, 2013 #2 oh yes: Code: Copy Dim parts() As String parts = Regex.Split("|", inString) Upvote 0
M Mahares Expert Licensed User Longtime User May 28, 2013 #3 Hi Ian: Actually you need to escape the | character with a back slash as it is a special character. Code: Copy Regex.Split("\|","a|b|c") Upvote 0
Hi Ian: Actually you need to escape the | character with a back slash as it is a special character. Code: Copy Regex.Split("\|","a|b|c")
IanMc Well-Known Member Licensed User Longtime User May 28, 2013 #4 Oh cool! I didn't know that, thanks. Upvote 0
A andrewtheart Member Licensed User Longtime User Oct 9, 2013 #6 There appear to be a few "special characters" like this. I know this from looking at several forum posts. The period . might be another one, cannot recall right now. Anyway, I really think they should be mentioned in the documentation on regex. I spent 30 minutes searching forums and scratching my head at odd split behaviour when it would have taken 2 minutes if it was pointed out in the documentation. Thanks all Upvote 0
There appear to be a few "special characters" like this. I know this from looking at several forum posts. The period . might be another one, cannot recall right now. Anyway, I really think they should be mentioned in the documentation on regex. I spent 30 minutes searching forums and scratching my head at odd split behaviour when it would have taken 2 minutes if it was pointed out in the documentation. Thanks all