On Sat, 25 Oct 2003 12:06:02 -0700, you wrote:

>In a character class, how do you include open and closed blocks? Ive tried
>this,
>
>[a-z0-9_.[\]!><]+
>
>and it doesnt work. I have also tried this,
>
>[a-z0-9_.\[\]!><]+
>
>and it too doesn't work. I want my character class to include any digits,
>alphabet characters, an underscore, a period, an exclamation mark, a
>greater than and less than symbol, AND an open block and closed block
>symbol. Any help would be appreciated.

The "]" is not special when it appears at the beginning of a character
class, so the following will work nicely:

[][a-z\d_.!<>]

If you want uppercase letters as well, you can simplify this further:

[][\w.!<>]

-- 
Eric Amick
Columbia, MD


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to