m/ (?=^[^a]*a[^a]*$) ## One a and no other a's (?=^[^b]*b[^b]*$) ## One b and no other b's (?=^[^c]*c[^c]*$) ## One c and no other c's ^.{3}$ ## Exactly three chars /x and print "$_: matched" for 'aaa'..'ccc';; abc: matched acb: matched bac: matched bca: matched cab: matched cba: matched
In reply to Re: REgular expression to check the string that allows "a","b" and "c" to occur only once in any order.
by BrowserUk
in thread REgular expression to check the string that allows "a","b" and "c" to occur only once in any order.
by isha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |