extract CN field from the string returned by getSubjectDN() method

Hi people, please can you help me?when I'm using getSubjectDN() method of the X509Certificate class, I'm receiving a string containg a group of fields, but how can i extract value of CN field from this string, can you advice to me classes that can do that.
[272 byte] By [fenria] at [2007-11-27 1:18:17]
# 1
Regular expressions, starting with java.util.regex.Pattern .
sabre150a at 2007-7-11 23:54:06 > top of Java-index,Security,Cryptography...