I have input string like this: <BR><BR>[0020]X[0030] [0040]X[0050] [0060] [0070] <BR><BR>The numbers in the brackets [] are FieldCodes and those next to it are the values. <BR><BR>What I need a regular expression for checking fields with values duplicated. For example, in the above string, I want to see if more than one field ([0020] and [0040]) has the value &#039;X&#039;. In other words, I want all the fields that have value X and that satisfy some criteria like this:<BR><BR>([(00[2-8]0&#124009[368])]X) #How to repeat this by a quantifier?<BR><BR>Can some body help me? It&#039;s very urgent