Table::BoxFormat::Unicode::CharClasses - character classes to work with db SELECT result formats
use Table::BoxFormat::Unicode::CharClasses ':all'; $horizontal_dashes_plus_crosses_or_whitespace = qr{ ^ [ \p{IsHor} \s ] + $ }x; $cross_character = qr{ \p{IsCross} {1,1} # just one }xms; $column_separator = qr{ \s+ # require leading whitespace \p{IsDelim} {1,1} # just one \s+ # require trailing whitespace }xms;
Table::BoxFormat::Unicode::CharClasses, contains a number of pre-defined character classes to assist in writing regular expressions to match elements of typical database SELECT result formats (see: Table::BoxFormat).
None by default, ':all' for all.
Definitons of some custom regexp character properties that might be useful for projects such as Table::BoxFormat, that work with the tabular text formats used by database monitors to display select results.
Matches characters found in a "horizontal rule" row.
Matches the "cross" characters used at line intersections.
Matches the delimeter/separator characters used on column boundaries.
the unicode psql format uses these three characters:
uniprops U+2502 U+2502 ‹│› \N{BOX DRAWINGS LIGHT VERTICAL} \pS \p{So} All Any Assigned InBoxDrawing Box_Drawing Common Zyyy So S Gr_Base Grapheme_Base Graph GrBase Other_Symbol Pat_Syn Pattern_Syntax PatSyn Print Symbol Unicode X_POSIX_Graph X_POSIX_Print
uniprops U+2500 U+2500 ‹─› \N{BOX DRAWINGS LIGHT HORIZONTAL} \pS \p{So} All Any Assigned InBoxDrawing Box_Drawing Common Zyyy So S Gr_Base Grapheme_Base Graph GrBase Other_Symbol Pat_Syn Pattern_Syntax PatSyn Print Symbol Unicode X_POSIX_Graph X_POSIX_Print
uniprops U+253c U+253C ‹┼› \N{BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL} \pS \p{So} All Any Assigned InBoxDrawing Box_Drawing Common Zyyy So S Gr_Base Grapheme_Base Graph GrBase Other_Symbol Pat_Syn Pattern_Syntax PatSyn Print Symbol Unicode X_POSIX_Graph X_POSIX_Print
Either of these two characters may be data delimiters, the ascii vertical bar or the unicode "BOX DRAWINGS LIGHT VERTICAL":
|│
Table::BoxFormat perlrecharclass
Joseph Brenner, <doom@kzsu.stanford.edu>
Copyright (C) 2016 by Joseph Brenner
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
2 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
Non-ASCII character seen before =encoding in '‹│›'. Assuming UTF-8
To install Table::BoxFormat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Table::BoxFormat
CPAN shell
perl -MCPAN -e shell install Table::BoxFormat
For more information on module installation, please visit the detailed CPAN module installation guide.