Example of confilcting Regular Expressions with aliases:
alias regextest {
noop $regex(Here is my regex,/(.+)/)
echo -a $!regml(1): $regml(1)
var %a = $regedit($regml(1))
var %b = $regml(1)
echo -a % $+ a - %a
echo -a % $+ b - %b
}
alias regedit return $regsubex(abc,/D/,lol)
that kills the original $regml(1), and replaces it with nothing, as there is no $regml to be captured in that alias.
However; adding a regex name to the identifier solves this problem.
alias regextest2 {
noop $regex(Here is my regex,/(.+)/)
echo -a $!regml(1): $regml(1)
var %a = $regedit2($regml(1))
var %b = $regml(1)
echo -a % $+ a - %a
echo -a % $+ b - %b
}
alias regedit2 return $regsubex($ticks,abc,/D/,lol)