MySQL regexp_substr() Function

MySQL regexp_substr() function is used for pattern matching. It returns the substring from the given string.

Syntax

snippet
select regexp_substr('str', 'match_type', occurrence, position, );

Example 1

snippet
select regexp_substr('java t point', '[a-z]+', 2, 3);

Output:

MySQL regexp_substr Function

Example 2

snippet
select regexp_substr('my sql function', '[a-z]+', 1, 3);

Output:

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