Something like this would do it.
echo "After-u-math-how-however" | cut -f1,2 -d'-'
This will split up (cut) the string into fields, using a dash (-
) as the delimiter. Once the string has been split into fields, cut
will print the 1st and 2nd fields.