Revert "Remove mexp from core and string search."

This reverts commit 54324e5f8a3271847acfe81e444dd6eed28010fc.
Remove mexp from core and string search.