Extract Image from RTF (Rich Text Area) Salesforce

String ​imgPath = String.valueOf(<RTF filed>);
imgPath = imgPath.subString( (imgPath.indexof('src')+5),imgPath.indexof('"',imgPath.indexof('src')+5));

Exp : String ​imgPath = String.valueOf(accObj.nyRtf__c);
imgPath = imgPath.subString( (imgPath.indexof('src')+5),imgPath.indexof('"',imgPath.indexof('src')+5));