1) 'CALL @ MAKE WHOLE + 37 1/2 BP.

2) CPN INC/DEC 25BP FOR EACH RTG UPGRADE/DOWNGRADE. ISS'D IN EXCH OF 144A/REGS SEC.UNSEC'D. CALL @ > PAR OR MAKE WHOLE + 45 BP. LONG 1ST CPN.

Requirement -

* 1. When MAKE_WHOLE_CALL = 'Y', Look for word "MAKE WHOLE" or "MAKE-WHOLE" or "MKWL" in NOTES_DES field. (Note: we can get 21 more securities covered if add words " MAKEWHOLE" and "MAKE WHOLE" (2 spaces between MAKE and WHOLE), this will puts us around 95% coverage)

* 2. Scan each character after one of the above words found, starting from the position the word found + length (word found), until a numeric character is found but exit if the current position is = Length(Notes Des) or a character "." is found before a numeric value found.

* 3. Once the numeric value is found, accumulate the numeric characters until the next character is "B" or Space or the position = Length (Notes Des). If the current character is a "." then see if the next character is numeric, if it is then take both "." and numeric characters and continue, otherwise exit. If the current character is Space then see if the next 3 characters are "1/2" then append ".5" to the accumulated numeric value.

* 4. Write the value found in the above logic to NOTES_DES location in the original record.

my required output will be 37.5 and 45. ####

Existed code -

the script to remove the . is: $all=~s/\./\n/g;

the script to find the digits from the records if 'MAKE WHOLE' present in the record: #if($all=~/MAKE WHOLE/) #{ #if($all=~/(\d+)/g) #{ #print $1; # #} #print $1; #} #else #{ #print "bye"; #}

the above script is not working ie. it give me only 37, because it will match 37 1/2 and 45.