Closed bryllyg closed 3 years ago
Hey @bryllyg,
Sorry, I am new to GitHub, so if anything I do is incorrect, take it lightly =) Hope to help out though.
My first attempt was:
{{split (each (split "44554- Text one;85554- Text two;" ";")(.)) "-"}}
It failed, as the "each" was having issues...
Afterwards, I tried:
{{split (join (split "44554- Text one;85554- Text two;" "- ") ";") ";"}}
Because the first Split creates an array. We have to Join it. Then we can Split again on all the dashes. Resulting in: 44554,Text one,85554,Text two, Technically they are an array of strings.
I hope this helps. What is your field of work btw? I am a MIS admin, where we generate documents, using handlebars.
@Devilthehell Works like a charm! Thanks!
@bryllyg that's great! I'm glad this worked for you, and thanks @Devilthehell for the suggestion.
@bryllyg I'm going to go ahead and close since it seems like this resolved your question. please reopen if necessary.
I don't think this is possible, but can you use the split helper to split a string at two different characters? For example, if the string is:
44554- Text one;85554- Text two;
Can you split it at both the "-" and the ";"
Or, is there some other way to approach this, using pre-created helpers?
Any insight appreciated.