Revamping regex and keyword generating facilities