B4J Question regex.split help

raphipps2002

Active Member
Licensed User
Longtime User
I have a spinner/combobox object with items made of two parts separated with '|'

The combobox's ID is cmbBankID

e.g. Bank|123

Paypal|345

Savings|987

I want to identify each part i.e. Payal and 345 or Savings and 987

B4X:
Dim BID() As String
BID = Regex.Split("|",cmbBankID.Value)


Using Payal|345 But using the regex is get in Bid(0) = P and bid(1) = a

And not 'Payal' and '345' as expected.....

what am i doing wrong?

thanks
 

raphipps2002

Active Member
Licensed User
Longtime User
I see....so how many special characters are there? Is it possible and safe therefore to put then escape all the time so cover all eventualities
 
Upvote 0
Top