Substring/Top and tail: Difference between revisions
→{{header|jq}}: using regex
(jq) |
(→{{header|jq}}: using regex) |
||
Line 544:
"a"[1:-1] # => ""
</lang>
Recent versions of jq also have regular expression support, with named captures. This leads to many other possibilities, e.g.<lang jq>"abc" | capture( ".(?<monkey>.*)." ).monkey => "b"</lang>
=={{header|Julia}}==
<lang julia>julia> "My String"[2:end] # without first character
|