public static String guessPDBID ( String name ) { Matcher match = PDBID_REGEX . matcher ( name ) ; if ( match . matches ( ) ) { return match . group ( 1 ) . toUpperCase ( ) ; } else { // Give up if doesn't match return null ; } }
Recognizes PDB IDs that occur at the beginning of name followed by some delimiter .