jQuery: Get Substring from a String

To get the substring value from a specified string, we can use JavaScript substring() method.

This method will return a part of string based on start and end point parameter value.

Syntax: substring (startPosition, endPosition);

StartPosition: This is mandatory parameter, mention start point value, from where you get sub string value.

EndPosition: This is optional, if you don’t specify, it will return the rest of string.

Check Below Example to Extract a Substring out of a String:

 

Recommended Posts For You

About Harish

I am professional web developer and blogger. Use this blog to share own api and other web development experience with you. I do accept paid work. Write to me at - [email protected]

View all posts by Harish