[Tfug] Regex poser

Ryan Cresawn jrcresawn at gmail.com
Wed Nov 4 22:05:10 MST 2009


On Wed, Nov 4, 2009 at 9:45 PM, Bexley Hall <bexley401 at yahoo.com> wrote:
> Hi Ryan,
>
>> > I want a regex that is essentially
>> >
>> > [\x20-\x60][\x80-\xFF][\x60-\xDF]
>> >
>> > but *excludes* \x22\x83\x78
>>
>> Try this:
>>
>> [\x20-\x21\x23-\x60][\x80-\x82\x84-\xFF][\x60-\x77\x79-\xDF]
>
> But that will also exclude
>
> [\x20-\21\x23-\x60]\x83\x78
> and
> \x22[\x80-\x82\x84-\xFF][\x60-\x77\x79-\xDF]
>
> assuming I didn't screw this up (did I forget any others?)

So how about this?

([\x20-\x21\x23-\x60][\x80-\xFF][\x60-\xDF]|[\x20-\x60][\x80-\xFF][\x60-\x77\x79-\xDF]|[\x20-\x60][\x80-\x82\x84-\xFF][\x60-\xDF])

Ryan




More information about the tfug mailing list