当前位置:网站首页>SVG中年月日相关的表达式
SVG中年月日相关的表达式
2022-04-23 06:26:00 【大可山人】
// 年份
static string PatternYear { get; set; } = @"(<g>)?(?<Start><text.*>)(?<Year>\d{4}年?)(?<End><\/text>)(<\/g>)?";
// 英文月份
static string PatternEnglishMonth { get; set; } = @"(?<Start><text.*>)(?<EngMonth>[A-Za-z]{3,})(?<End></text>)";
// 数字月份
static string PatternMonthNo { get; set; } = @"(?<Start><text.*>)((?<MonthNo>\d{1,2})|(?<Month2>(0?\d|d{2})))(?<End></text>)";
// "阳历月" (3字母以上的英文+1至2字的数字月份)。如匹配:”Jan 1“或”February 02“等
static string PatternMonth { get; set; } = "((" + PatternEnglishMonth + @"[\r\n\t ]*" + PatternMonthNo + ")|(" + PatternMonthNo + @"[\r\n\t ]*" + PatternEnglishMonth + "))";
// "英文月" (包括全称或3字简称)。 如匹配:“JANUARY”"FEB"“MAY”等,如忽略大小写,可以匹配:”Jan“, ”JaNuary“, ”May“, ”October“等。
static string PatternEngMonthName { get; set; } = @"((JAN(UARY)?|MA(R(CH)?|Y)|JUL(Y)?|AUG(EST)?|OCT(OBER)?|DEC(EMBER)?))|(SEPT|NOV|DEC)(EMBER)?|FEB(RUARY)?|APR(IL)?|JU((LY?)|(NE?))";
//阳历日期
static string PatternDate { get; set; } = @"(<g>)?(?<Start><text.*>)(?<Date>\d{1,2})(?<End><\/text>)(<\/g>)?";
//“干支”,如匹配:丙辰
static string PatternGanZhi { get; set; } = @"(?<Start><text[^>].*>)(?<GanZhi>[甲乙丙丁戊己庚辛壬癸]{1}[子丑寅卯辰巳午未申酉戌亥]{1}[年月日]?[^<]*)(?<End></text>)";
//“生肖年”。如匹配:“牛年”“虎”等。
static string PatternAnimal { get; set; } = @"<text[^>].*>[鼠牛虎兔龙蛇马未㺅鸡狗猪]{1}年?.*<\/text>"; //<text[^>].*>[鼠牛虎兔龙蛇马未㺅鸡狗猪]{1}年?.*<\/text>
//“简称英文星期”
static string PatternWeekName { get; set; } = @"(?<Start><text.*>)(?<WeekName>[\s\t ]*[A-Z]{2,3})(?<End>[\s\t ]*</text>)";
//“简称英文星期+中文序号”。匹配:“SUN日”“MO一”等。
static string PatternWeekCnName { get; set; } = @"(?<Start><text.*>[\s\t]*)(?<WeekCnName>[A-Z]{2,3}[\s\t\ ]*[日一二三四五六]{1})(?<End>[\s\t\ ]*</text>)";
//“农历年+农历月”。匹配:“壬寅年 丁丑月”等
static string PatternLuarYearMonth { get; set; } = @"(?<Start><text.*>[\s\t]*)(?<LuarYearMonth>[甲乙丙丁戊己庚辛壬癸]{1}[子丑寅卯辰巳午未申酉戌亥]{1}年?[\s\t]*[\[\{\(\(\{\[\【]?[甲乙丙丁戊己庚辛壬癸]{1}[子丑寅卯辰巳午未申酉戌亥]{1}月?[\s\t\r\n ]*[\]\}\)\)\}\]\】]?)(?<End>[\s\t\r\n\ ]*</text>)";
//“农历年+农历月”(含text标签)。匹配类似:“甲寅年 戊辰月”
static string PatternFullLuarYearMonth { get; set; } = @"(?<Start><text.*>[\s\t]*)(?<LuarYear>[甲乙丙丁戊己庚辛壬癸]{1}[子丑寅卯辰巳午未申酉戌亥]{1}年?)[\s\t\r\n ]*(?<LuarMonth>[\[\{\(\(\{\[\【]?[甲乙丙丁戊己庚辛壬癸]{1}[子丑寅卯辰巳午未申酉戌亥]{1}月?[\s\t\r\n ]*[\]\}\)\)\}\]\】]?)(?<End>[\s\t\r\n]*</text>)";
//“农历年+生肖”(纯文字)。匹配:“壬寅【虎】”"丁丑(羊)"“甲辰{龙}”等。
static string PatternYearAnimal { get; set; } = @"(?<Start><text.*>[\s\t]*)(?<LuarYear>[甲乙丙丁戊己庚辛壬癸]{1}[子丑寅卯辰巳午未申酉戌亥]{1}年?)[\s\t]*[{【\{\[(\(](?<Animal>[鼠牛虎兔龙蛇马未㺅鸡狗猪]{1}年?)[】\}\]\))}](?<End>[\s\t\r\n]*</text>)";
//“农历年+生肖年”(含text标签)。如匹配:“壬寅年【虎年】”,“丁丑 (牛)”等
static string PatternFullYearAnimal { get; set; } = @"(?<Start><text.*>[\s\t]*)(?<LuarYear>[甲乙丙丁戊己庚辛壬癸]{1}[子丑寅卯辰巳午未申酉戌亥]{1}年?)[\s\t\r\n ]*[【\{\[(\(](?<Animal>[鼠牛虎兔龙蛇马未㺅鸡狗猪]{1}年?)[】\}\]\))](?<End>[\s\t\r\n]*</text>)";
//“农历日”
static string PatternLuarDate { get; set; } = @"(?<Start><text.*>[\s\t]*)(?<LuarDate>[初一二三四五六七八九十廿]{2})(?<End>[\s\t]*</text>)";
为方便使用,不加序号,用加粗字代表标题。
版权声明
本文为[大可山人]所创,转载请带上原文链接,感谢
https://blog.csdn.net/johnsuna/article/details/121324433
边栏推荐
- [Ted series] how to get along with inner critics?
- 11. Table and library management
- 数组扁平化
- Thorough inquiry -- understanding and analysis of cocos2d source code
- [hdu6833]A Very Easy Math Problem(莫比乌斯反演)
- 2. Restricted query
- SAP RFC_CVI_EI_INBOUND_MAIN BP主数据创建示例(仅演示客户)
- SAP PI/PO rfc2RESTful 發布rfc接口為RESTful示例(Proxy間接法)
- Nacos / sentinel gateway current limiting and grouping (code)
- 2.限定查询
猜你喜欢

h5本地存储数据sessionStorage、localStorage

Nacos/sentinel网关限流和分组 (代码)

How to judge whether a point is within a polygon (including complex polygons or a large number of polygons)

AuthorizationServer(授权服务器的简单搭建)

如何判断点是否在多边形内(包含复杂多边形或者多边形数量很多的情况)

canvas学习第一篇

King glory - unity learning journey

FSM finite state machine

ABAP 从CDS VIEW 发布OData Service示例

Super classic & Programming Guide (red and blue book) - Reading Notes
随机推荐
SAP DEBUG调试FOR IN、REDUCE等复杂的语句
BTree、B+Tree和HASH索引
SAP 导出Excel文件打开显示:“xxx“的文件格式和扩展名不匹配。文件可能已损坏或不安全。除非您信任其来源,否则请勿打开。是否仍要打开它?
Processing of common dependency module
Game assisted script development journey
系统与软件安全研究(一)
状态同步与帧同步
Ogldev reading notes
Solutions to common problems in visualization (VII) solutions to drawing scale setting
积性函数与迪利克雷卷积
BTREE, B + tree and hash index
移动布局(flex布局、视口标签)
SAP ECC连接SAP PI系统配置
Django uses MySQL database to solve error reporting
对js中argumens的简单理解
常用的DOS命令
js之DOM事件
Design optimization of MySQL database
js之节点操作,为什么要学习节点操作
防抖和节流