I have a string which includes the text:
...,"names":"exampleName",...
I have the following if statement that checks if the regex pattern matches the string:
if [[ $string =~ names\":\"(\w+)\" ]]; then
echo "Matches"
fi
The problem is the echo statement never get's executed, which essentially means that the regex didn't match.
Is there something I'm doing wrong here? Because it should match...
Cheers.