fadjer
(Fadjer)
1
Hi,
I want to split this string by ‘/’ and get the first element :
/ecm-core/getReferentialNamesYouNeed/flashL/flashP
When I set the ‘Split by’ with / I get a message error. Please check the first image
When I escape the /, and setting "Split by’ with /, not split is made. Please check the second image.
What’s the right way to make this simple split ?
Many Tanks
jochen
(Jochen)
2
It’s pretty unintuitive, but you’re using the wrong target index.
Using "/"
(not "\/"
) will split the string “/ecm-core/getReferentialNamesYouNeed” into the following components:
- “” (empty string, because that’s what is in front of the first split character)
- “ecm-core”
- “getReferentialNamesYouNeed”
So you need the target index 2 (“ecm-core”), not 1 (empty string).
fadjer
(Fadjer)
3
Thanks. Comparing to java way is really unintuitive as you say Thanks again
system
(system)
Closed
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.