Your task is to recreate two functions from String.object (indexOf() and lastIndexOf()).
This function will accept a string and regex as searched value, take a look at target string and return the first index if there is a match.
If any value matches, return the first index found, else return -1.
This function is the same as indexOf except it will return the last index if there is a match.
For example, with regex you can try to find all matches in the string but the lastIndexOf function must return the index of the character at the fromIndex parameter or lower.
If any value matches, return the last index found, else return -1.
N/A