Can i use multiple delimiters in string split
Question

Hi, 

So I want to split string with multiple delimiters

For example abc def;ghi.jkl

Output should be abc def ghi jkl as a list of text values

Note: it would be fine if I can use last index of method with multiple search values. 

Like last index of(abc def;ghi, ";", " ") 


Thanks, 

Sai. 

Solution

Hi, Posting sample OML based on your requirements, let us know if anything required.



Thanks,

Sandeep.

SplitAddress.oml

Hi Jeevan,

the quickest way I remind now is to use Replace() in the string as many times you have different delimiters and then use it inside a String_Split:

Regards


Hi,

Please share us the exact requirement.


Thanks,

Sandeep.

Hi,

for Ex this is the text I'm having with me 

NO72 GROUND FLR 2ND CROSS 5TH MAIN SANJAV NAGAR KEBLAYOUT BANGALORE KARNTAKA INDIA

as of now I need to get the two string parts from the above text

Requirements are as follows:


  1. Need to get the first 40 Characters 
  2. Search from the right to left for the special characters(for now you can consider one or two, I can include more based on your sample OML), say we got the first match at 20 from the right end
  3. then 1 to 20 characters will be my first string
  4. then need to consider 20 to end and again extract first 40 characters
  5. Need to repeat the 2nd step
  6. we can leave the remaining string after getting the two inputs.


Thanks,

Sai.

Solution

Hi, Posting sample OML based on your requirements, let us know if anything required.



Thanks,

Sandeep.

SplitAddress.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.