- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can I use SUBSTRING_INDEX() function to get the substring as output which is between two same delimiters in a string?
152 Lectures 16 hours
87 Lectures 5.5 hours
We need to use nested SUBSTRING_INDEX() function for getting the substring as output which is between two same delimiters in a string. For example, from the string ‘www.tutorialspoint.com’, we want the substring ‘tutorialspoint’, which is in between two same delimiters ‘.’ as output then SUBSTRING_INDEX() function can be used in nested form as follows −
mysql> Select SUBSTRING_INDEX(SUBSTRING_INDEX('www.tutorialspoint.com','.',2),'.',-1)AS 'Nested SUBSTRING_INDEX'; +------------------------+ | Nested SUBSTRING_INDEX | +------------------------+ | tutorialspoint | +------------------------+ 1 row in set (0.02 sec)
- Which function in MySQL returns the same output as BIN() function?
- How can we get substring from a string in Python?
- Get the index of last substring in a given string in MySQL?
- While fetching the data as output, how can I use multiple conditions on same column?
- How to get substring of a string in jQuery?
- How can I use Python regex to split a string by multiple delimiters?
- Return the lowest index in the string where substring is found using Python index()
- How can I get the output of a Matplotlib plot as an SVG?
- How can I search a character or substring in java?
- Return the lowest index in the string where substring is found in a range using Python index()
- How can we replace all the occurrences of a substring with another substring within a string in MySQL?