good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi Monks, I looking for a regular expression: I want to search for a sign(x), followed by a number n of any signs, followed by x, followed by the SAME number n of any signs, followed by x the sign x of course is also allowed for the "any" signs VAILD for example is :
NOT VALID for example (not the same number of signs between x) x12x1xA way would be to code every case. But this is not a smart way! /(xxx)|(x..x..x)|(x...x...x)|(x.{4}x.{4}x)/Follwoing is not working, because it would find the term x12x1x (not the same number of signs between x) /x.{0,50}x.{0,50}x/Many Thanks for any suggestion !
|
|