From the command line, I was able to replace Bootstrap 3 classes with Bootstrap 4 class using
ack, sed and xargs.
ack "search text" -l --print0 | xargs -0 -n 1 sed -i "s/search text/replacement text/"
Reference:
Sed recursively with the help of ack and xargs