On Oct 27, [EMAIL PROTECTED] ([EMAIL PROTECTED]:
Brian:
Brian: If you want to make sure they are alternating like <><><> etc... I would do
Brian: this:
Brian:
Brian: $_ = $line;
Brian:
Brian: @syms = m/[<>]/g;
Brian: $string = join("", @syms);
Brian: if ($strings !~ m/^<(><)*>$/)
Brian: {
Brian: ## Scream here!
Brian: }
Brian:
Brian: The regular expression:
Brian:
Brian: m/^<(><)*>$/
Brian:
Brian: will ensure that it starts with < and ends with > and anything in between
Brian: will be "><" which I think should do the trick. That logic is pretty hairy
Brian: though and I could be missing something.
Wouldnt m/[<>]/g literally match <> and not <characters>?
Why wouldnt it be m/[<.+>]/g ?
Thanks
Birl
Please do not CC me responses to my own posts.
I'll read the responses on the list.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>