For example, in this code golf, what was previously s.lF or s.lhQe would become s.l.
Another example: Trying to replace every matching substring with another substring
Code:
:Q
Inputs and Outputs:
"foo bar", "ba.", "baz" ---> foo baz
"var a = true", "true", "false" ---> var a = false
"yeeeeeees pleeeeeaseee", "e+", "e" ---> yes please
The input would be evaluated to a string list of length 3. The : operator, when supplied 3 arguments,
is regex match-and-replace. Since it's a list, Q would be implicitly expanded to @Q0@Q1@Q2. In other words,
For example, in this code golf, what was previously
s.lF
ors.lhQe
would becomes.l
.Another example: Trying to replace every matching substring with another substring Code:
Inputs and Outputs:
The input would be evaluated to a string list of length 3. The
:
operator, when supplied 3 arguments, is regex match-and-replace. Since it's a list,Q
would be implicitly expanded to@Q0@Q1@Q2
. In other words,would be equivalent to