I am having a string that I need to parse and get number in required format like'1/2' from string 

Example :- Take 1/2 bowl of water

I want to extract from the above string . 

Currently I am Trying to use Regex to Extract this required text.

Code that I am currently using To Check If String Has Numbers and Extract that Numbers - 

```
function hasNumbers(t) {
//To check if string has numbers
  return /\d/.test(t);
}

function getNumberFromString(txt) {
//To extract number in 1/2 from string but currently it is giving '12' instead of '1/2'
  var numb = txt.match(/\d/g);
  numb = numb.join("");
  return numb;
}

```