JavaScript String Search Browser Support substring()is an ECMAScript1 (JavaScript 1997) feature. It is supported in all browsers: ChromeEdgeFirefoxSafariOperaIE YesYesYesYesYesYes ❮PreviousJavaScript StringReferenceNext❯ Track your progress - it's free!
Technical Details Works in:From MySQL 4.0 More Examples Example Return a substring of a string before a specified number of delimiter occurs: SELECTSUBSTRING_INDEX("www.w3schools.com",".",2); Try it Yourself » ❮Previous❮ MySQL FunctionsNext❯ ...
Track your progress - it's free! Log in Sign Up COLOR PICKER PLUS SPACES GET CERTIFIED FOR TEACHERS FOR BUSINESS CONTACT US Top Tutorials HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ ...
Extract 3 characters from a string, starting in position 1: SELECTSUBSTRING('SQL Tutorial',1,3)ASExtractString; Try it Yourself » Definition and Usage The SUBSTRING() function extracts some characters from a string. Syntax SUBSTRING(string,start,length) ...
Works in:From MySQL 4.0 More Examples Example Extract a substring from the text in a column (start at position 2, extract 5 characters): SELECTSUBSTRING(CustomerName,2,5)ASExtractString FROMCustomers; Try it Yourself » Example Extract a substring from a string (start from the end, at pos...