public static String getTagAttr ( StringBuilder page , final String tag , final String attr ) { String found = null ; Pattern daPattern = TagMagix . getPattern ( tag , attr ) ; Matcher matcher = daPattern . matcher ( page ) ; int idx = 0 ; if ( matcher . find ( idx ) ) { found = matcher . group ( 1 ) ; found = trimAttrValue ( found ) ; } return found ; }
find and return the ATTR value within a TAG tag inside the HTML document within the StringBuffer page . returns null if no TAG - ATTR is found .