Hi. New fish user, and first post here.
What's the recommended way to do regular expression testing and matching in
fish? The test function doesn't support regexes. I could use expr, for
example:
if expr $var : 'a(.)b(.)'
then
# do something with the match
end
but that's awkward, because expr will only output the result of one match,
it sends the result to stdout, and the exit status isn't necessarily 0 on
success - it depends on the regex.
What I'd like is to have is a function or operator whose exit status tells
me whether the regex matched, and that returns an array of the matched
results from ()... kind of like how (sorry) bash does it.
Any suggestions?
Thanks,
Andrew.
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users