Function that can be used to find a substring inside another string.


import { getStringMatch } from '@contentful/f36-utils';


Basic usage

You pass the base string as a first argument, and a string to match it with as a second argument. The function will return an object containing the match, what comes before the match, and what comes after the match in the base string.

Example with other components

You can find an example of using getStringMatch in Autocomplete component documentation

Help improve this page