Devv Active Member Licensed User Longtime User Jul 19, 2016 #1 I'm trying to split a string usually i use regex but this time the split key is a vertical bar "|" when i use this: B4X: sting = "firstpart|secondpart" Regex.Split("|",sting) b4a is thinking that | is a pattern an i', getting a wrong return value how can i tell b4a that this is a split key and not a patters any ideas
I'm trying to split a string usually i use regex but this time the split key is a vertical bar "|" when i use this: B4X: sting = "firstpart|secondpart" Regex.Split("|",sting) b4a is thinking that | is a pattern an i', getting a wrong return value how can i tell b4a that this is a split key and not a patters any ideas
DonManfred Expert Licensed User Longtime User Jul 19, 2016 #2 | is a special character. Escape it! "\|" Upvote 0
Devv Active Member Licensed User Longtime User Jul 19, 2016 #3 DonManfred said: | is a special character. Escape it! "\|" Click to expand... perfect thank you it worked , but by any chance can you explain please how "\" helped ? Upvote 0
DonManfred said: | is a special character. Escape it! "\|" Click to expand... perfect thank you it worked , but by any chance can you explain please how "\" helped ?