Android Question Split string with regex

Devv

Active Member
Licensed User
Longtime User
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:

Code:
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
 
| is a special character. Escape it! "\|"
 
Upvote 0

Similar Threads

  • Question Question
Android Question Regex B4A & B4J
Replies
22
Views
10K
  • Question Question
Android Question Regex.split
Replies
4
Views
3K
  • Question Question
Android Question Regex split
Replies
2
Views
4K
  • Question Question
Android Question split with regex
Replies
4
Views
3K
Back
Top