I want to extract a code from an input string from different pages. Sample code is 
'110-PT-0988'. 

This RegExp fits other possible cases `'^\d{3}-[A-Z]{1,6}-\d{4}[A-Z]{0,2}$'`.

I want to return a string variable containing the code within the input string e.g. for an input string 

`'Code part: xx Code No: 120-PXT-2234X System Process .....xyz blah blah'.`

I want the return string to be `'120-PXT-2234X'`