- 授权协议: 未知
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/JonAbrams/xeger
软件介绍
Xeger 是更富有表现力的 JavaScript 正则表达式,Xeger 发音为 "zeeger"。
使用:
var xeger = require('xeger');
/* Parsing a URL. Getting the schema, host, path, and url params */
/* Instead of this */
var boringRegex= /(https?)\:\/\/([^\/]+)(.+)\?(.*)/;
/* Write this! */
var coolRegex = xeger(function (x) {
/* schema */
x.group(function (x) {
x.literal('http');
x.literal('s', { optional: true });
});
x.literal('://');
/* host */
x.group(function (x) {
x.not('/', { multiple: true });
});
/* path */
x.group(function (x) {
x.any({ multiple: true });
});
x.literal('?');
/* query params */
x.group(function (x) {
x.any({ multiple: true, optional: true });
});
});
var matched = coolRegex.exec('https://www.google.com/search?q=my_search');匹配:
[ 'https://www.google.com/search?q=my_search', 'https', /* schema */ 'www.google.com', /* host */ '/search', /* path */ 'q=my_search', /* query params */ index: 0, input: 'https://www.google.com/search?q=my_search' ]
小团队构建大网站:中小研发团队架构实践
张辉清 等 / 电子工业出版社 / 2019-1 / 69
《小团队构建大网站:中小研发团队架构实践》结合作者近几年的工作经验,总结了一套可直接落地、基于开源、成本低、可快速搭建的中小研发团队架构实践方法。《小团队构建大网站:中小研发团队架构实践》共5篇22章,开篇是本书的导读;架构篇是设计思想的提升,包括企业总体架构、应用架构设计、统一应用分层等;框架篇主讲中间件和工具的使用,包括消息队列、缓存、Job、集中式日志、应用监控和微服务等;公共应用篇是技术与......一起来看看 《小团队构建大网站:中小研发团队架构实践》 这本书的介绍吧!
