MySQL Regexp_instr() function is used for pattern matching. It returns the index value of the substring from the given string. This function returns 0 if no match is found else it returns 1.
select regexp_instr('str', 'pattern', ['position']);
select regexp_instr('BCA jhon', 'BCA')
Output:
select regexp_instr('BCA jhon', 'BCA', 1)
Output: