These aren't the characters you're looking for...

Abigail abigail at abigail.be
Tue Aug 19 21:00:39 BST 2008


On Tue, Aug 19, 2008 at 12:24:17PM +0100, Andy Wardley wrote:
> Abigail wrote:
>
>> You might want to use:
>>
>>     (?!\n)[\h\v]
>
> In this case, I specifically want to exclude the vertical tab (not that I'm
> ever likely to come across it).

\v isn't "vertical tab". \v (new in 5.10, will also be in Perl 6) matches
any vertical whitespace, which includes the vertical tab, but also the
linefeed (\r), form feed (^L), carriage return (\n), next line (\x85),
line separator (\x{2028}), and paragraph separator (\x{2029}).

> What does \h match?

Horizontal whitespace, also new in 5.10. 19 characters in total,
including often used characters like the mongolian vowel separator,
the narrow no-break space, and the ogham space mark.

For more details, see "man perlrecharclass".



Abigail


More information about the london.pm mailing list