Accurate recognition of differences and similarities in stereochemical structures is achieved by extended CAST (CAnonical-representation of STereochemistry) coding method. Using the CAST notations, complete search of partial structures as well as whole structures by matching with the query in any level from a specific atom considering planar, configurational, and conformational information has been achieved. Differences and similarities of stereochemistry in four aldopentoses of D-xylose, D-ribose, D-arabinose, and D-lyxose, which have three chiral centers, are clearly represented by the extended CAST. Applications for some organic compounds containing more complicated stereochemical structures are also demonstrated.