in reply to Re: REgular expression to check the string that allows "a","b" and "c" to occur only once in any order.
in thread REgular expression to check the string that allows "a","b" and "c" to occur only once in any order.

The assignment of $pos has a bug in ...

( $pos = index $str , $p , $pos ) >= 0 and $once++ ;

... which caused index() to some times start from -1, not ot mention $pos was not being reset to 0. Please ignore my previous reply.

  • Comment on Re^2: REgular expression to check the string that allows "a","b" and "c" to occur only once in any order.
  • Select or Download Code