V vinians Member Licensed User Longtime User Oct 5, 2012 #1 I'm trying to split a string with "|" as separator, but instead of it it's returning a vector with all letters of string. What I need is the words! what is wrong? sample code.... Code: dim Lista() as String result = Response.GetString("UTF8") Lista = Regex.Split("|", result) Sample string: "Joel|Maria|Eduardo" Thanks!
I'm trying to split a string with "|" as separator, but instead of it it's returning a vector with all letters of string. What I need is the words! what is wrong? sample code.... Code: dim Lista() as String result = Response.GetString("UTF8") Lista = Regex.Split("|", result) Sample string: "Joel|Maria|Eduardo" Thanks!
klaus Expert Licensed User Longtime User Oct 5, 2012 #2 You should add \ before | because this one is a metacharacter in Regex. Code: Dim Lista() as String result = Response.GetString("UTF8") Lista = Regex.Split("\|", result) Best regards. Upvote 0
You should add \ before | because this one is a metacharacter in Regex. Code: Dim Lista() as String result = Response.GetString("UTF8") Lista = Regex.Split("\|", result) Best regards.
V vinians Member Licensed User Longtime User Oct 5, 2012 #3 Thanks! worked like a charm! Flws! Upvote 0