MySQL regexp_instr() Function

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.

Syntax

snippet
select regexp_instr('str', 'pattern', ['position']);

Example 1

snippet
select regexp_instr('BCA jhon', 'BCA')

Output:

MySQL regexp_instr Function

Example 2

snippet
select regexp_instr('BCA jhon', 'BCA', 1)

Output:

MySQL regexp_instr Function
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +