blob: 0655281bffa45e5b21ced8c17c4f20c9e5692dde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
grammar;
//
// Z is the unicode class for separators, including line, paragraph, and space
// separators. C is the class for control characters. P is the class for
// punctuation. This regexp tests for the intersection of the negation of these
// character classes, which is any character NOT in one of these three classes.
//
// [1] is the official reference, and [2] is a site that is useful for browsing
// to get an intuitive idea of what these classes mean.
//
// [1] http://www.unicode.org/reports/tr44/#General_Category_Values
// [2] https://www.compart.com/en/unicode/category
//
pub Filename: String = <filename:r"[\P{Z}&&\P{C}&&\P{P}]+"> => filename.to_string();
|