<p>1) 'CALL @ MAKE WHOLE + 37 1/2 BP. <p>2) CPN INC/DEC 25BP FOR EACH RTG UPGRADE/DOWNGRADE. ISS'D IN EXCH O +F 144A/REGS SEC.UNSEC'D. CALL @ > PAR OR MAKE WHOLE + 45 BP. LONG 1ST + CPN. <p>Requirement - <p>* 1. When MAKE_WHOLE_CALL = 'Y', Look for word "MAKE WHOLE" or "M +AKE-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 u +s around 95% coverage) <p>* 2. Scan each character after one of the above words found, star +ting from the position the word found + length (word found), until a +numeric character is found but exit if the current position is = Leng +th(Notes Des) or a character "." is found before a numeric value foun +d. <p>* 3. Once the numeric value is found, accumulate the numeric char +acters until the next character is "B" or Space or the position = Len +gth (Notes Des). If the current character is a "." then see if the next character is nu +meric, if it is then take both "." and numeric characters and continu +e, otherwise exit. If the current character is Space then see if the next 3 characters ar +e "1/2" then append ".5" to the accumulated numeric value. <p>* 4. Write the value found in the above logic to NOTES_DES locati +on in the original record. <P> my required output will be 37.5 and 45.
<p>Existed code - <p> the script to remove the . is: $all=~s/\./\n/g; <p> 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"; #} <p> the above script is not working ie. it give me only 37, because it will match 37 1/2 and 45.
In reply to problem with records: by roc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |