I want to use the RegExp constructor to run a regular expression against a string and let me get both the match and the remaining string.
the above is to be able to implement the following UI pattern:
as you can see in the image I need to separate the match from the rest of the string to be able to apply some style or any other process separately.
/**
* INPUT
*
* input: 'las vegas'
* pattern: 'las'
*
*
* EXPECTED OUTPUT
*
* match: 'las'
* remaining: 'vegas'
*/
