Will you only ever have one set of limiter/delimeter ?
Will you be able to control what these are going to be?
Is it likely that there will be orphaned or broken html fragments in the string?
( eg $myVar=“There’s Something About Mobile</h3>…” )
Will the text inside the limiter pairs possibly contain orphaned fragments of html?
(eg “<startDelimiter>Max</b></endDelimiter>”)
I am satisfied with centered effect’s code above which works with one set of limiter/delimeter, but if I can use more set of limiter/delimeter, it will be better.
I am sorry, but I don’t understand it exactly.
Anyway I will control it after dividing.
No, there will be no orphaned or broken html.
No, there will be no orphaned fragments or full of html inside the limiter pairs.
Centred effect changed your delimiters to ** which provided a convenient solution to your problem.
Are you able to influence what the delimeters are going to be? (or are you reading a string coming from a 3rd party - where you have to sort out what you are given?)
Because Centred effects solution conveniently had start and end delimeters which are the same unlike your example (“<startDelimiter>” and “</endDelimiter>”) it can also be used to split up the string n times.
If this does it for you, then that is really great news and you got a simple solution - but it does not match the question you asked, so I thought I might dig a bit deeper - that is all I meant.
Anyhow, maybe you will be able to pose a more realistic example in the future if it does not work out for you - the bits about fragmented and orphaned html tags comes from bitter experience of doing the same thing I am afraid …