in reply to Re: Creating spacers in regex match
in thread Creating spacers in regex match

Alternation sounds good, but only if just 34 23 or 39 4b are accepted. From what I gather from the OP, any two pairs of hexadecimal digits could get there. Alternation really isn't the means to the desired end here.

Replies are listed 'Best First'.
Re^3: Creating spacers in regex match
by Jim (Curate) on Jul 09, 2011 at 05:25 UTC
    Alternation sounds good, but only if just 34 23 or 39 4b are accepted. From what I gather from the OP, any two pairs of hexadecimal digits could get there. Alternation really isn't the means to the desired end here.

    You misread what the OP wrote. Only 34 23 and 39 4b are acceptable.

    I want to be able to match both these strings
    ...16 03 01 34 23 0b.... ...16 03 01 39 4b 0b....

    Alternation is what's needed here.

    Jim

      I don't mean to turn this into some kind of heated debate about nothing, but it's the following line that leads me to interpret this as something for which alterntions aren't suited:

      I was wondering if there was a way to write a match expression like "m/16 03 01 anything anything 0b/".