in reply to Exclude some non-word char from Regexp \W
I know the solutions given so far are great for excluding (or including, if one looks at it that way) 'a few more' things from a negated character class, but is there any general way to perform arithmetic of character classes? That is, is there any general way to get, say, the intersection of two character classes that's as natural as /[[:class1:][:class2:]]/ for union? (I realise that one can do (/(?=[[:class1:]])[[:class2:]]/, but that's not quite what I mean.)