> I'd use sed and the regex "-[0-9]" to delimit the field > > > foo=`echo '123--bad-2xyz-3--' | sed -r -e "s/-[0-9].*//"` > echo $foo > 123--bad > > > Helpful?
Perfect - thanks!
> I'd use sed and the regex "-[0-9]" to delimit the field > > > foo=`echo '123--bad-2xyz-3--' | sed -r -e "s/-[0-9].*//"` > echo $foo > 123--bad > > > Helpful?
Perfect - thanks!