troubleshooting Question

How to split with different starting and ending delimitorss

Avatar of emkayr
emkayr asked on
1 Comment1 Solution199 ViewsLast Modified:
Let me say I have a string "I want to 'split this string into^ an array".  I want to split and store this into an array and I know I can do it with split function if the delimitor is same throughout.  But I have two delimitors (in this case '  and ^) and want the result to an array with 3 elements as below (put within square brackets for readability):
1st : [I want to ]
2nd: ['split this string into]
3rd: [ an array]

How do i do this?

Thanks to everyone for the help.
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros