Retrieve the string part before the last search match. Original source from Sí, funciona
module:common-exports
Retrieve the string part before the last search match. Original source from Sí, funciona