I would like to contruct a regular expression that matches when the first charater *is* a DLE and the second character is anything but a DLE. I'm having trouble, because I doubt that variables are interpolated in a character class:use constant DLE => 0x10;
I'd be interested in any alternatives, as long as the DLE is defined symbolically and not "hard coded". Thanks !my $dle = chr(DLE); $msg =~ /\A$dle[^$dle]/;
In reply to Interpolation in character class by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |