I have a string "this is a test Meaning ID: 1 Status: Active lorem ipsum lorem ipsum". I want to retrive "1" between the two strings 'Meaning ID: ' and 'Status: '. The content between the two strings will change but the two strings themselves are static. I dont want to replace the content just want to retrive it into a variable.
I have tried using :
var meaningPattern = /Meaning ID: /g;
var statusPattern = /Status: /g;
and applied this to the original string and tried to get the substring but it just matches the pattern and does not return any substring.
var contentIWant = originalString.substring(meaningPattern, statusPattern);