Split a character string based on change of character: Difference between revisions
Content deleted Content added
jq |
→{{header|jq}}: using the -r option |
||
Line 613: | Line 613: | ||
| join(sep) ; |
| join(sep) ; |
||
" |
"gHHH5YY++///\\" | splitAtChange(", ")</lang> |
||
{{out}} |
{{out}} |
||
Using the -r ("raw output") option of jq: |
|||
<pre>"aa, bb, cc"</pre> |
|||
<pre>g, HHH, 5, YY, ++, ///, \</pre> |
|||
=={{header|Kotlin}}== |
=={{header|Kotlin}}== |