Posted on: 3/17/2011 10:03:02 AM | Views : 280

Hi,
I am reading .css fle which is having following 2 css classes:
.cp-body a:link
{
color: #FF0000;text-decoration: none;
}
body a:link
{
color: #CCFF33;text-decoration: none;
}
Now I want index of both ".cp-body a:link" and "body a:link".
But when I try to find index of "body a:link" it gives me index of ".cp-body a:link", because it also contain body a:link.
I am using following code:
        string cssClassName = "body a:link";
        string regexPattern = string.Format(@"\b{0}\b", cssClassName);
        Regex rx = new Regex(regexPattern);

        int sPos = -1;
        if (rx.Match(strStyle).Success)
        {
  &n ...

Go to the complete details ...