Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: string match simplification?





On 2024-09-03 09:03, Mark J. Reed wrote:

[[ $filename =~ '\.([^.]*)$' ]]
extension=$match[1]

That does it.  So that or Roman's idea are both fine.  Getting these things right -- my clunky code works, but so sloppy -- this is elegant.



Messages sorted by: Reverse Date, Date, Thread, Author