Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by parv (Parson)
on Dec 11, 2007 at 11:06 UTC ( [id://656375]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://656375]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2024-04-25 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found