bitpie苹果版钱包|grex

作者: bitpie苹果版钱包
2024-03-07 19:02:57

【评测】G-REX细胞培养系统 - 知乎

【评测】G-REX细胞培养系统 - 知乎首发于生命科学切换模式写文章登录/注册【评测】G-REX细胞培养系统漫画怪蜀黍生科笔记 有用的都在这里细胞治疗是指将正常或生物工程改造过的人体细胞移植或输入患者体内,以达到治疗的目的。按治疗使用的细胞种类可以分为干细胞治疗和免疫细胞治疗两类。干细胞是具有多向分化潜能、自我更新能力的细胞,在体内能够分化产生某种特定组织的细胞。干细胞治疗一般用于治疗慢性退行性疾病。对于慢性退行性疾病,通常采取姑息疗法,即延缓疾病的进展或并发症的发生,而并不能从根本上治疗疾病。在某些情况下,可以进行器官移植;然而这种方法受到供体器官短缺的限制,并且患者需要接受长期的免疫抑制治疗。干细胞治疗通常选择患者自体的干细胞,注入患者病变部位,使用生物活性物质来诱导损伤器官再生;或者在体外培育器官或组织,用于替换损伤部位。由于采用自体干细胞,因此避免了免疫排斥的问题。免疫细胞是人体免疫系统的重要组成部分,能够识别非自身物质,并对非自身物质进行攻击。因此免疫细胞治疗一般用于治疗肿瘤。治疗肿瘤的传统方法是手术、放疗和化疗。手术对局限性肿瘤有效,不适用于弥漫性肿瘤;放疗和化疗虽然能够杀死肿瘤细胞,但是对人体的伤害过大。免疫细胞治疗的方法是采取患者自身的免疫细胞,在体外进行改造、活化及扩增,再回输到患者体内。此方法对人体伤害小且能有效杀伤肿瘤,是治疗肿瘤的有效方法。常用于细胞免疫治疗的细胞包括:CAR-T、TCR-T、TIL、NK、CIK等。然而,与淋巴细胞的分离、修饰、扩增相关的技术和安全问题是限制免疫细胞治疗的重要因素。细胞免疫治疗对于免疫活性细胞数量的要求极高。以细胞因子诱导的杀伤细胞(CIK)为例,据报道,CIK细胞治疗的剂量是每次注射108-1010个细胞。使用传统的细胞培养瓶扩增细胞,需要通过频繁操作来调整细胞浓度以及为细胞提供新鲜培养基,大大增加了污染的风险。使用透气性培养袋或生物反应器是大规模生产CIK细胞的替代方案。然而,培养袋需要大量的新鲜培养基,并且需要频繁调整细胞密度;而生物反应器则笨重、昂贵、操作复杂。与上述方法相比,G-Rex是更好的选择。与其他装置相比,G-Rex利用了培养基中营养物质的对流,而不是扩散。G-Rex的结构可以增加细胞上方培养基的深度,这提供了几乎无限的氧气和营养物质,并且稀释了代谢废物。氧气和二氧化碳的气体交换是通过放置在设备底部的透气膜发生的,从而优化了细胞的增殖和存活。Pierangle Palmerini等人证明了使用G-Rex培养CIK细胞的可行性。CIK是一种体外扩增和活化的T淋巴细胞,在扩增过程中表达CD56,并表现出T细胞和NK细胞的一些功能和表型特征。CIK与其他细胞治疗方法相比,其优势在于:①通过定时添加重组人干扰素γ、抗CD3单克隆抗体和重组人白细胞介素2,很容易从体外的外周血单个核细胞(PBMC)和脐带血中获取;②CIK细胞不需要肿瘤的抗原特异性刺激,能有效对抗实体及血液恶性肿瘤;③临床前数据表明,与T细胞相比,CIK细胞引起宿主免疫对抗疾病的风险较低,这也是CIK细胞的一大优势;④相比于NK细胞,CIK细胞的存活和活性不依赖于IL-2的联合给药,从而限制了多器官毒性的风险。作者使用G-Rex6(图1)和G-Rex6M(图2)培养PBMC,以普通的T形细胞培养瓶作为对照。G-Rex6和G-Rex6M的孔表面积相同(10 cm2),但是容量不同(G-Rex6为40 mL,G-Rex6M为100 mL)。培养条件为37℃、5% CO2 。使用X-VIVO 10 培养基(Lonza),含1% 青霉素/链霉素(Lonza)。图1 G-Rex6图2 G-Rex6M培养方法(图3)为:第0天。在G-Rex中接种PBMC,每孔2.5×106个细胞(2.5×105个细胞/cm2),加满培养基(G-Rex6加40 mL,G-Rex6M加100 mL)。加入1000 IU/mL 人干扰素γ。第1天。加入50 ng/mL 人CD3抗体。从第1天开始,每3-4天加入500 IU/mL 重组人白细胞介素2。第7天,将在G-Rex6中培养的PBMC转移至G-Rex6M中,并补充60 mL新鲜培养基和500 IU/mL 重组人白细胞介素2。第0、7、14、21、28天,检测细胞的生长、活力、表型和细胞毒活性。图3 CIK细胞培养方案图示细胞增殖结果(图4)表明,使用G-Rex6培养PBMC,并在第7天改用G-Rex6M,其细胞增殖效率显著高于其他组。 87表型分析结果(图6)表明,使用G-Rex6与G-Rex6M接替培养的方法,CIK更多表现为未致敏的初始表型,而其体外扩增的潜力正与其初始表型有关。细胞毒性实验结果(图7)表明,使用G-Rex6与G-Rex6M接替培养的方法,其对肿瘤的杀伤力与对照组相似,仅对K562肿瘤靶细胞的杀伤能力略有降低。在此研究中,在G-Rex中接种PBMC,并用临床级细胞因子刺激,产生了大量CIK细胞,而且几乎不需要技术干预,减少了与操作相关的时间和风险。使用传统方法培养细胞需要每周2次操作,调整培养体积。而使用G-Rex仅需在第7天调整1次细胞密度,并且每3-4天添加IL-2。细胞治疗产品中未成熟细胞的比例与其体外扩增潜力及随后的临床效果密切相关。使用传统方法扩增的CIK细胞已分化亚群比例较高,扩增潜力受限。而CIK细胞在G-Rex中表现出明显的未成熟表型,并且与未成熟表型相关的CD62L、CD45RA、CCR7表达显著上调,解释了CIK细胞在G-Rex中惊人的扩增潜力。CIK注入人体后,攻击肿瘤的是已分化的效应细胞;当效应细胞被消耗后,未成熟细胞分化为效应细胞,持续介导抗肿瘤反应。因此,在G-Rex中培养的CIK细胞,具有长期对抗肿瘤的能力。综上所述,使用G-Rex培养细胞,极大减少了培养操作,降低了污染风险,并且能够生产出更高比例的未成熟CIK细胞,有助于体内抗肿瘤反应的持久性;此外,G-Rex还适用于培养常规免疫细胞治疗所需的各种细胞,除了CIK细胞以外,还包括CAR-T、TCR-T、TIL、NK等细胞。与传统培养方法相比,G-Rex的优势包括:传统方法G-Rex每天操作,费时费力每周仅需补液1-2次,拒绝周末加班!培养瓶占地大,想要大规模扩增细胞却培养箱已被占满用更小的空间养更多的细胞,充分利用培养箱空间传代操作,随着细胞扩增,容器数量也不断增加一个容器内扩增细胞,无需传代图4 细胞扩增和活力统计(A)细胞数。(B)细胞扩增倍数。(C)细胞活力。图5 CIK细胞表型分析图6 CIK细胞初始/记忆表型分析图7 CIK细胞对肿瘤细胞的细胞毒活性分析参考文献Palmerini P , AD Pietà, Sommaggio R , et al. A serum-free protocol for the ex vivo expansion of Cytokine-Induced Killer cells using gas-permeable static culture flasks[J]. Cytotherapy, 2020, 22(9).G-Rex产品目录 (北京泽平科技代理G-Rex系列产品,请搜索“北京泽平科技”进入咨询)货号名称底面积最大培养体积80192MG-Rex24 24孔底透气型培养板2cm2(每孔)8ml(每孔)80240MG-Rex6 6孔底透气型培养板10cm2(每孔)40ml(每孔)80040SG-Rex10 底透气型培养瓶10cm240ml80500G-Rex100 底透气型培养瓶100cm2450ml80660MG-Rex6M 6孔底透气型培养板10cm2(每孔)100ml(每孔)80110SG-Rex10M 底透气型培养瓶10cm2100ml81100G-Rex100M 底透气型培养瓶100cm21000ml85500SG-Rex500M 底透气型培养瓶500cm25000ml80110S-CSG-Rex10M CS 底透气型培养瓶10cm2100ml81100-CSG-Rex100M CS 底透气型培养瓶100cm21000ml85500S-CSG-Rex500M CS 底透气型培养瓶500cm25000ml80000EGatheRex 半自动细胞收集装置发布于 2022-12-21 09:21・IP 属地北京细胞死亡细胞细胞培养(书籍)​赞同 3​​添加评论​分享​喜欢​收藏​申请转载​文章被以下专栏收录生

G-REX® FOR T CELL THERAPY | Wilson Wolf Manufacturing

G-REX® FOR T CELL THERAPY | Wilson Wolf Manufacturing

HOME

TECHNOLOGY

Technology

Publications

G-Rex® Quiet Revolution Video

G-Rex Closed System Video

Future of T Cell Manufacturing Video

APPLICATIONS

G-Rex for T Cell Therapy

Innovations for Routine Cell Culture

PRODUCT & ORDER INFO

Ordering Info

G-Rex Documentation

FAQ

NEWS

ABOUT

CONTACT US

G-Rex: The Gold Standard for T Cell Therapy

The Clear AdvantageG-Rex® stands for Gas Permeable Rapid Expansion and is the result of applying our disruptive technology to the needs of immunotherapy.

G-Rex® is the only production platform created specifically to produce immune cells such as T cells, natural killer cells, and hematopoietic cells.

G-Rex® is proving to be the most practical and cost effective way to scale up and scale out.

We welcome your input as we work to make G-Rex® the gold standard for immune cell production.

The advantages of the G-Rex® platform are significant:

Linear Scale Up

Protocols established in R & D translate directly to commercial production without altering cell phenotype

Practical Scale Out

One device per patient

No feeding required

Easily automated

No specialized equipment is dedicated to a patient (such as Prodigy, WAVE rocker)

Shortest possible production cycle (e.g. can turn 300 million cells into 100 billion cells in just 11 days)

Highly Cost Effective

Most efficient use of media and reagents

Minimal labor

Occupies the least amount of space

Greatly simplifies the logistics required to produce cells

Optimizes Downstream Processing

At the end of expansion, allows 90% of medium to be removed in just 4 minutes without cell loss

Minimizes the complexity of downstream processing and maintains a controlled environment

Repeatable Outcomes

Consistent ratios of CD4 to CD8

Population retains naïve phenotype (i.e. may be more persistent)

HOME

TECHNOLOGY

G-REX APPLICATIONS

PRODUCT & ORDER INFO

NEWS

ABOUT

CONTACT US

Contact Us At :

info@wilsonwolf.com

(651) 628-9259

2100 Old Highway 8

Saint Paul, MN 55112

© Copyright Wilson Wolf 2019

G-Rex电子竞技俱乐部_百度百科

x电子竞技俱乐部_百度百科 网页新闻贴吧知道网盘图片视频地图文库资讯采购百科百度首页登录注册进入词条全站搜索帮助首页秒懂百科特色百科知识专题加入百科百科团队权威合作下载百科APP个人中心收藏查看我的收藏0有用+10G-Rex电子竞技俱乐部播报讨论上传视频中国香港电子竞技俱乐部G-Rex电子竞技俱乐部是一家总部位于中国香港的电子竞技俱乐部,成立于2017年,旗下曾拥有《英雄联盟》、《绝地求生》等电竞分部。 [1]G-Rex电子竞技俱乐部旗下《英雄联盟》分部前身为Raise Gaming,收购后更名为G-Rex。在2018年获得LMS春季赛亚军,并打进了S8全球总决赛。2020年2月,G-Rex官宣旗下《英雄联盟》分部退出2020年度PCS赛区的所有赛事。 [24]中文名G-Rex电子竞技俱乐部外文名G-Rex Gaming创办时间2017年创办地点中国香港运动项目电子竞技主要荣誉2018年LMS春季赛亚军目录1团队历史▪英雄联盟分部▪绝地求生分部2队员列表3数据统计4团队荣誉团队历史播报编辑英雄联盟分部早期历史G-Rex2016年,G-Rex电子竞技俱乐部的前身Raise Gaming(简称RG)正式建立,RG由前Taipei Berserkers部分成员组成,在ECS联赛中经过两季磨练,于2017年LMS夏季升降赛时,成功击败Team Yetti,取得夏季赛席位。进入LMS后,RG首轮几乎打出了全胜的成绩,最后以10胜4负排名常规赛第二。季后赛以1:3不敌AHQ,未能进入决赛,获得夏季赛季军。 [2-3]2017年9月,RG向LMS联盟委员会提出经营权转移申请,将2018LMS春季赛之出赛资格与经营权,由所属的锐思娱乐有限公司,全数转移给香港英皇娱乐集团旗下之英皇电竞动力有限公司,此后RG便改名为G-Rex。 [2]2017年12月,G-Rex官宣前华义Spider的打野选手Empt2y加入。 [15]2018赛季2018年LMS春季赛,G-Rex以上单PK、打野Baybay、中单Candy与Wuji、下路Stitch、辅助Koala为主的阵容在常规赛取得12胜2负排名第二,季后赛先是3:0击败MAD,随后在决赛以0:3不敌闪电狼,获得春季赛亚军。 [4]G-Rex2018夏季赛阵容2018年亚洲洲际赛,MAD作为LMS赛区的四只代表队伍之一出战,小组赛两场全负。淘汰赛中LMS赛区以0:3不敌LCK赛区。 [5]2018年LMS夏季赛,G-Rex以6胜9负排名常规赛第五,未能进入季后赛。 [6]随后的S8预选赛,G-Rex先后以3:1、3:0战胜HKA和JTeam,成为LMS的三号种子参加2018英雄联盟全球总决赛。 [7]2018年英雄联盟全球总决赛,G-Rex在入围赛的小组赛阶段4战全胜直接进入正赛。 [8]但在小组赛上,G-Rex以0胜6负排名垫底,遭到淘汰。 [9]2018年11月,G-Rex官宣打野Raise、中路Candy、下路Stitch恢复自由身份。 [16]2018年12月,G-Rex官宣2019春季赛大名单,PK选手将继续留任上单。在保留了队内原打野的基础上,从已经解散的Team Afro引入打野选手Epic。原队内中单Candy离队,轮换Wuji成为队内唯一正选中单。下路方面从业余选手中提拔Bruce入队,同时引入原AHQ战队下路选手Atlen。 而在辅助方面,引入原先征战LMS赛区次级联赛的选手Eason。 [17]2019赛季G-Rex2019春季赛阵容2019年LMS春季赛,G-Rex在赛程过半时因队伍成绩不佳,宣布前中路选手Candy和前打野选手Empt2y重新回归。 [18]最终G-Rex在常规赛取得6胜8负,未能进入季后赛。 [19]2019年LMS夏季赛,G-Rex在常规赛取得5胜7负排名第五,未能进入季后赛。 [20]随后的S9预选赛,G-Rex在第一轮3:1战胜MAD,第二轮0:3不敌HKA,无缘2019英雄联盟全球总决赛。 [21]2019年11月13日,G-Rex官宣原打野选手Mountain转型担任主教练。 [22]2019年11月20日,G-Rex官宣战队总监Toyz离队,中路Candy和辅助Yoon合约结束,恢复自由人身份,中路Wuji退役。 [23]2020年2月,G-Rex官宣因经济环境严峻,旗下《英雄联盟》分部退出2020年度PCS赛区的所有赛事。 [24]绝地求生分部2018年4月,英皇电竞宣布正式成立G-Rex《绝地求生大逃杀(PlayerUnknown’s Battlegrounds)》职业电竞战队,由队长Blackwai与队员小肥、Neo及Alex组成。 [1]队员列表播报编辑英雄联盟分部队员列表游戏ID位置Kartis上单PK上单Gemini打野M1ssion中单AtlenADCBruceADCKoala辅助KL打野以上为队伍解散时最终队员列表 [25]数据统计播报编辑英雄联盟分部数据统计赛事比赛场次总击杀总阵亡总助攻胜率一血率大龙控制率2019LMS夏季赛3035640485446.7%53.3%54.8%2019LMS春季赛3739346894043.2%37.8%44.7%S8世界总决赛1417719140950.0%42.9%41.2%2018LMS夏季赛3637548692344.4%55.6%44%2018LMS春季赛36429330111772.2%41.7%59%参考资料: [10-14]团队荣誉播报编辑英雄联盟分部团队荣誉(不完全统计)年份赛事成绩2018年LMS春季赛亚军英雄联盟全球总决赛十六强参考资料: [4] [9]新手上路成长任务编辑入门编辑规则本人编辑我有疑问内容质疑在线客服官方贴吧意见反馈投诉建议举报不良信息未通过词条申诉投诉侵权信息封禁查询与解封©2024 Baidu 使用百度前必读 | 百科协议 | 隐私政策 | 百度百科合作平台 | 京ICP证030173号 京公网安备110000020000

GitHub - pemistahl/grex: A command-line tool and Rust library with Python bindings for generating regular expressions from user-provided test cases

GitHub - pemistahl/grex: A command-line tool and Rust library with Python bindings for generating regular expressions from user-provided test cases

Skip to content

Toggle navigation

Sign in

Product

Actions

Automate any workflow

Packages

Host and manage packages

Security

Find and fix vulnerabilities

Codespaces

Instant dev environments

Copilot

Write better code with AI

Code review

Manage code changes

Issues

Plan and track work

Discussions

Collaborate outside of code

Explore

All features

Documentation

GitHub Skills

Blog

Solutions

For

Enterprise

Teams

Startups

Education

By Solution

CI/CD & Automation

DevOps

DevSecOps

Resources

Learning Pathways

White papers, Ebooks, Webinars

Customer Stories

Partners

Open Source

GitHub Sponsors

Fund open source developers

The ReadME Project

GitHub community articles

Repositories

Topics

Trending

Collections

Pricing

Search or jump to...

Search code, repositories, users, issues, pull requests...

Search

Clear

Search syntax tips

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

Sign up

You signed in with another tab or window. Reload to refresh your session.

You signed out in another tab or window. Reload to refresh your session.

You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

pemistahl

/

grex

Public

Notifications

Fork

149

Star

6.5k

A command-line tool and Rust library with Python bindings for generating regular expressions from user-provided test cases

pemistahl.github.io/grex-js/

License

Apache-2.0 license

6.5k

stars

149

forks

Branches

Tags

Activity

Star

Notifications

Code

Issues

7

Pull requests

0

Discussions

Actions

Security

Insights

Additional navigation options

Code

Issues

Pull requests

Discussions

Actions

Security

Insights

pemistahl/grex

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

 mainBranchesTagsGo to fileCodeFolders and filesNameNameLast commit messageLast commit dateLatest commit History370 Commits.github.github  benchesbenches  srcsrc  teststests  .editorconfig.editorconfig  .gitignore.gitignore  Cargo.lockCargo.lock  Cargo.tomlCargo.toml  LICENSELICENSE  README.mdREADME.md  README_PYPI.mdREADME_PYPI.md  RELEASE_NOTES.mdRELEASE_NOTES.md  demo.gifdemo.gif  demo.tapedemo.tape  grex.pyigrex.pyi  logo.pnglogo.png  pyproject.tomlpyproject.toml  requirements.txtrequirements.txt  website.jpgwebsite.jpg  View all filesRepository files navigationREADMEApache-2.0 license

1. What does this tool do?

grex is a library as well as a command-line utility that is meant to simplify the often

complicated and tedious task of creating regular expressions. It does so by automatically

generating a single regular expression from user-provided test cases. The resulting

expression is guaranteed to match the test cases which it was generated from.

This project has started as a Rust port of the JavaScript tool

regexgen written by

Devon Govett. Although a lot of further useful features

could be added to it, its development was apparently ceased several years ago. The plan

is now to add these new features to grex as Rust really shines when it comes to

command-line tools. grex offers all features that regexgen provides, and more.

The philosophy of this project is to generate the most specific regular expression

possible by default which exactly matches the given input only and nothing else.

With the use of command-line flags (in the CLI tool) or preprocessing methods

(in the library), more generalized expressions can be created.

The produced expressions are Perl-compatible regular expressions which are also

compatible with the regular expression parser in Rust's regex crate.

Other regular expression parsers or respective libraries from other programming languages

have not been tested so far, but they ought to be mostly compatible as well.

2. Do I still need to learn to write regexes then?

Definitely, yes! Using the standard settings, grex produces a regular expression that is guaranteed

to match only the test cases given as input and nothing else.

This has been verified by property tests.

However, if the conversion to shorthand character classes such as \w is enabled, the resulting regex matches

a much wider scope of test cases. Knowledge about the consequences of this conversion is essential for finding

a correct regular expression for your business domain.

grex uses an algorithm that tries to find the shortest possible regex for the given test cases.

Very often though, the resulting expression is still longer or more complex than it needs to be.

In such cases, a more compact or elegant regex can be created only by hand.

Also, every regular expression engine has different built-in optimizations. grex does not know anything

about those and therefore cannot optimize its regexes for a specific engine.

So, please learn how to write regular expressions! The currently best use case for grex is to find

an initial correct regex which should be inspected by hand if further optimizations are possible.

3. Current Features

literals

character classes

detection of common prefixes and suffixes

detection of repeated substrings and conversion to {min,max} quantifier notation

alternation using | operator

optionality using ? quantifier

escaping of non-ascii characters, with optional conversion of astral code points to surrogate pairs

case-sensitive or case-insensitive matching

capturing or non-capturing groups

optional anchors ^ and $

fully compliant to Unicode Standard 15.0

fully compatible with regex crate 1.9.0+

correctly handles graphemes consisting of multiple Unicode symbols

reads input strings from the command-line or from a file

produces more readable expressions indented on multiple using optional verbose mode

optional syntax highlighting for nicer output in supported terminals

4. How to install?

4.1 The command-line tool

You can download the self-contained executable for your platform above and put it in a place of your choice.

Alternatively, pre-compiled 64-Bit binaries are available within the package managers Scoop

(for Windows), Homebrew (for macOS and Linux), MacPorts (for macOS), and Huber (for macOS, Linux and Windows).

Raúl Piracés has contributed a Chocolatey Windows package.

grex is also hosted on crates.io,

the official Rust package registry. If you are a Rust developer and already have the Rust

toolchain installed, you can install by compiling from source using

cargo, the Rust package manager.

So the summary of your installation options is:

( brew | cargo | choco | huber | port | scoop ) install grex

4.2 The library

In order to use grex as a library, simply add it as a dependency to your Cargo.toml file:

[dependencies]

grex = { version = "1.4.5", default-features = false }

The dependency clap is only needed for the command-line tool.

By disabling the default features, the download and compilation of clap is prevented for the library.

5. How to use?

Detailed explanations of the available settings are provided in the library section.

All settings can be freely combined with each other.

5.1 The command-line tool

Test cases are passed either directly (grex a b c) or from a file (grex -f test_cases.txt).

grex is able to receive its input from Unix pipelines as well, e.g. cat test_cases.txt | grex -.

The following table shows all available flags and options:

$ grex -h

grex 1.4.5

© 2019-today Peter M. Stahl

Licensed under the Apache License, Version 2.0

Downloadable from https://crates.io/crates/grex

Source code at https://github.com/pemistahl/grex

grex generates regular expressions from user-provided test cases.

Usage: grex [OPTIONS] {INPUT...|--file }

Input:

[INPUT]... One or more test cases separated by blank space

-f, --file Reads test cases on separate lines from a file

Digit Options:

-d, --digits Converts any Unicode decimal digit to \d

-D, --non-digits Converts any character which is not a Unicode decimal digit to \D

Whitespace Options:

-s, --spaces Converts any Unicode whitespace character to \s

-S, --non-spaces Converts any character which is not a Unicode whitespace character to \S

Word Options:

-w, --words Converts any Unicode word character to \w

-W, --non-words Converts any character which is not a Unicode word character to \W

Escaping Options:

-e, --escape Replaces all non-ASCII characters with unicode escape sequences

--with-surrogates Converts astral code points to surrogate pairs if --escape is set

Repetition Options:

-r, --repetitions

Detects repeated non-overlapping substrings and converts them to {min,max} quantifier

notation

--min-repetitions

Specifies the minimum quantity of substring repetitions to be converted if --repetitions

is set [default: 1]

--min-substring-length

Specifies the minimum length a repeated substring must have in order to be converted if

--repetitions is set [default: 1]

Anchor Options:

--no-start-anchor Removes the caret anchor `^` from the resulting regular expression

--no-end-anchor Removes the dollar sign anchor `$` from the resulting regular expression

--no-anchors Removes the caret and dollar sign anchors from the resulting regular

expression

Display Options:

-x, --verbose Produces a nicer-looking regular expression in verbose mode

-c, --colorize Provides syntax highlighting for the resulting regular expression

Miscellaneous Options:

-i, --ignore-case Performs case-insensitive matching, letters match both upper and lower case

-g, --capture-groups Replaces non-capturing groups with capturing ones

-h, --help Prints help information

-v, --version Prints version information

5.2 The library

5.2.1 Default settings

Test cases are passed either from a collection via RegExpBuilder::from()

or from a file via RegExpBuilder::from_file().

If read from a file, each test case must be on a separate line. Lines may be ended with either a newline \n or a carriage

return with a line feed \r\n.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["a", "aa", "aaa"]).build();

assert_eq!(regexp, "^a(?:aa?)?$");

5.2.2 Convert to character classes

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["a", "aa", "123"])

.with_conversion_of_digits()

.with_conversion_of_words()

.build();

assert_eq!(regexp, "^(\\d\\d\\d|\\w(?:\\w)?)$");

5.2.3 Convert repeated substrings

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["aa", "bcbc", "defdefdef"])

.with_conversion_of_repetitions()

.build();

assert_eq!(regexp, "^(?:a{2}|(?:bc){2}|(?:def){3})$");

By default, grex converts each substring this way which is at least a single character long

and which is subsequently repeated at least once. You can customize these two parameters if you like.

In the following example, the test case aa is not converted to a{2} because the repeated substring

a has a length of 1, but the minimum substring length has been set to 2.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["aa", "bcbc", "defdefdef"])

.with_conversion_of_repetitions()

.with_minimum_substring_length(2)

.build();

assert_eq!(regexp, "^(?:aa|(?:bc){2}|(?:def){3})$");

Setting a minimum number of 2 repetitions in the next example, only the test case defdefdef will be

converted because it is the only one that is repeated twice.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["aa", "bcbc", "defdefdef"])

.with_conversion_of_repetitions()

.with_minimum_repetitions(2)

.build();

assert_eq!(regexp, "^(?:bcbc|aa|(?:def){3})$");

5.2.4 Escape non-ascii characters

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["You smell like ."])

.with_escaping_of_non_ascii_chars(false)

.build();

assert_eq!(regexp, "^You smell like \\u{1f4a9}\\.$");

Old versions of JavaScript do not support unicode escape sequences for the astral code planes

(range U+010000 to U+10FFFF). In order to support these symbols in JavaScript regular

expressions, the conversion to surrogate pairs is necessary. More information on that matter

can be found here.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["You smell like ."])

.with_escaped_non_ascii_chars(true)

.build();

assert_eq!(regexp, "^You smell like \\u{d83d}\\u{dca9}\\.$");

5.2.5 Case-insensitive matching

The regular expressions that grex generates are case-sensitive by default.

Case-insensitive matching can be enabled like so:

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["big", "BIGGER"])

.with_case_insensitive_matching()

.build();

assert_eq!(regexp, "(?i)^big(?:ger)?$");

5.2.6 Capturing Groups

Non-capturing groups are used by default.

Extending the previous example, you can switch to capturing groups instead.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["big", "BIGGER"])

.with_case_insensitive_matching()

.with_capturing_groups()

.build();

assert_eq!(regexp, "(?i)^big(ger)?$");

5.2.7 Verbose mode

If you find the generated regular expression hard to read, you can enable verbose mode.

The expression is then put on multiple lines and indented to make it more pleasant to the eyes.

use grex::RegExpBuilder;

use indoc::indoc;

let regexp = RegExpBuilder::from(&["a", "b", "bcd"])

.with_verbose_mode()

.build();

assert_eq!(regexp, indoc!(

r#"

(?x)

^

(?:

b

(?:

cd

)?

|

a

)

$"#

));

5.2.8 Disable anchors

By default, the anchors ^ and $ are put around every generated regular expression in order

to ensure that it matches only the test cases given as input. Often enough, however, it is

desired to use the generated pattern as part of a larger one. For this purpose, the anchors

can be disabled, either separately or both of them.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["a", "aa", "aaa"])

.without_anchors()

.build();

assert_eq!(regexp, "a(?:aa?)?");

5.3 Examples

The following examples show the various supported regex syntax features:

$ grex a b c

^[a-c]$

$ grex a c d e f

^[ac-f]$

$ grex a b x de

^(?:de|[abx])$

$ grex abc bc

^a?bc$

$ grex a b bc

^(?:bc?|a)$

$ grex [a-z]

^\[a\-z\]$

$ grex -r b ba baa baaa

^b(?:a{1,3})?$

$ grex -r b ba baa baaaa

^b(?:a{1,2}|a{4})?$

$ grex y̆ a z

^(?:y̆|[az])$

Note:

Grapheme y̆ consists of two Unicode symbols:

U+0079 (Latin Small Letter Y)

U+0306 (Combining Breve)

$ grex "I ♥ cake" "I ♥ cookies"

^I ♥ c(?:ookies|ake)$

Note:

Input containing blank space must be

surrounded by quotation marks.

The string "I ♥♥♥ 36 and ٣ and ." serves as input for the following examples using the command-line notation:

$ grex

^I ♥♥♥ 36 and ٣ and \.$

$ grex -e

^I \u{2665}\u{2665}\u{2665} 36 and \u{663} and \u{1f4a9}\u{1f4a9}\.$

$ grex -e --with-surrogates

^I \u{2665}\u{2665}\u{2665} 36 and \u{663} and \u{d83d}\u{dca9}\u{d83d}\u{dca9}\.$

$ grex -d

^I ♥♥♥ \d\d and \d and \.$

$ grex -s

^I\s♥♥♥\s36\sand\s٣\sand\s\.$

$ grex -w

^\w ♥♥♥ \w\w \w\w\w \w \w\w\w \.$

$ grex -D

^\D\D\D\D\D\D36\D\D\D\D\D٣\D\D\D\D\D\D\D\D$

$ grex -S

^\S \S\S\S \S\S \S\S\S \S \S\S\S \S\S\S$

$ grex -dsw

^\w\s♥♥♥\s\d\d\s\w\w\w\s\d\s\w\w\w\s\.$

$ grex -dswW

^\w\s\W\W\W\s\d\d\s\w\w\w\s\d\s\w\w\w\s\W\W\W$

$ grex -r

^I ♥{3} 36 and ٣ and {2}\.$

$ grex -er

^I \u{2665}{3} 36 and \u{663} and \u{1f4a9}{2}\.$

$ grex -er --with-surrogates

^I \u{2665}{3} 36 and \u{663} and (?:\u{d83d}\u{dca9}){2}\.$

$ grex -dgr

^I ♥{3} \d(\d and ){2}{2}\.$

$ grex -rs

^I\s♥{3}\s36\sand\s٣\sand\s{2}\.$

$ grex -rw

^\w ♥{3} \w(?:\w \w{3} ){2}{2}\.$

$ grex -Dr

^\D{6}36\D{5}٣\D{8}$

$ grex -rS

^\S \S(?:\S{2} ){2}\S{3} \S \S{3} \S{3}$

$ grex -rW

^I\W{5}36\Wand\W٣\Wand\W{4}$

$ grex -drsw

^\w\s♥{3}\s\d(?:\d\s\w{3}\s){2}{2}\.$

$ grex -drswW

^\w\s\W{3}\s\d(?:\d\s\w{3}\s){2}\W{3}$

6. How to build?

In order to build the source code yourself, you need the

stable Rust toolchain installed on your machine

so that cargo, the Rust package manager is available.

Please note: Rust >= 1.70.0 is required to build the CLI. For the library part, Rust < 1.70.0 is sufficient.

git clone https://github.com/pemistahl/grex.git

cd grex

cargo build

The source code is accompanied by an extensive test suite consisting of unit tests, integration

tests and property tests. For running them, simply say:

cargo test

Benchmarks measuring the performance of several settings can be run with:

cargo bench

7. Python extension module

With the help of PyO3 and

Maturin, the library has been compiled to a

Python extension module so that it can be used within any Python software as well.

It is available in the Python Package Index and can

be installed with:

pip install grex

To build the Python extension module yourself, create a virtual environment and install

Maturin.

python -m venv /path/to/virtual/environment

source /path/to/virtual/environment/bin/activate

pip install maturin

maturin build

The Python library contains a single class named RegExpBuilder that can be imported like so:

from grex import RegExpBuilder

8. WebAssembly support

This library can be compiled to WebAssembly (WASM) which allows to use grex

in any JavaScript-based project, be it in the browser or in the back end running on Node.js.

The easiest way to compile is to use wasm-pack. After the installation,

you can, for instance, build the library with the web target so that it can be directly used in the browser:

wasm-pack build --target web

This creates a directory named pkg on the top-level of this repository, containing the compiled wasm files

and JavaScript and TypeScript bindings. In an HTML file, you can then call grex like the following, for instance:

There are also some integration tests available both for Node.js and for the browsers Chrome, Firefox and Safari.

To run them, simply say:

wasm-pack test --node --headless --chrome --firefox --safari

If the tests fail to start in Safari, you need to enable Safari's web driver first by running:

sudo safaridriver --enable

The output of wasm-pack will be hosted in a separate repository which

allows to add further JavaScript-related configuration, tests and documentation. grex will then be added to the

npm registry as well, allowing for an easy download and installation within every JavaScript

or TypeScript project.

There is a demo website available where you can give grex a try.

9. How does it work?

A deterministic finite automaton (DFA)

is created from the input strings.

The number of states and transitions between states in the DFA is reduced by applying

Hopcroft's DFA minimization algorithm.

The minimized DFA is expressed as a system of linear equations which are solved with

Brzozowski's algebraic method,

resulting in the final regular expression.

10. What's next for version 1.5.0?

Take a look at the planned issues.

11. Contributions

In case you want to contribute something to grex, I encourage you to do so.

Do you have ideas for cool features? Or have you found any bugs so far?

Feel free to open an issue or send a pull request. It's very much appreciated. :-)

About

A command-line tool and Rust library with Python bindings for generating regular expressions from user-provided test cases

pemistahl.github.io/grex-js/

Topics

python

rust

cli

terminal

tool

regex

regexp

python-library

regular-expression

regex-pattern

command-line-tool

rust-library

regular-expressions

rust-crate

rust-cli

Resources

Readme

License

Apache-2.0 license

Activity

Stars

6.5k

stars

Watchers

45

watching

Forks

149

forks

Report repository

Releases

15

grex 1.4.5

Latest

Mar 6, 2024

+ 14 releases

Packages

0

No packages published

Used by 156

+ 148

Contributors

10

Languages

Rust

96.3%

Python

3.7%

Footer

© 2024 GitHub, Inc.

Footer navigation

Terms

Privacy

Security

Status

Docs

Contact

Manage cookies

Do not share my personal information

You can’t perform that action at this time.

x-cmd pkg | grex - 用于生成正则表达的命令行工具 - 知乎

x-cmd pkg | grex - 用于生成正则表达的命令行工具 - 知乎首发于pkg切换模式写文章登录/注册x-cmd pkg | grex - 用于生成正则表达的命令行工具x-cmd命令行管理工具简介grex 是一个旨在简化创作正则表达式的复杂且繁琐任务的库和命令行程序。这个项目最初是 Devon Govett 编写的 JavaScript 工具 regexgen 的 Rust 移植。但 regexgen 在几年前停止了开发。现在grex提供了 regexgen 提供的所有功能,还增加了许多新的功能。首次用户使用 x grex 即可自动下载并使用在终端运行 eval "$(curl https://get.x-cmd.com)" 即可完成 x 命令安装, 详情参考 x-cmd 官网 x-cmd 提供1分钟教程,其中包含了 grex 命令常用功能的 demo 示例,可以帮你快速上手 grex 。使用案例:grex-1min-cn# 生成字母 a-f 的正则表达式

x grex a b c d e f

# 将所有 Unicode 十进制数字转换为 \d

x grex -d "bc" "111"

# 将所有不是 Unicode 十进制数字的字符转换为 \D

x grex -D bc "111"

# 将所有 Unicode 空格字符转换为 \s

x grex -cs "bc" "bc das"

# 将所有 Unicode 字符转换为 \w

x grex -cw "%c*" "bc das"

# 检测重复的非重叠子字符串并将其转换为量词表示法

x grex -cr "%2c*" "bbc DDdas"

# 在详细模式下生成外观更好的正则表达式,以及语法突显

x grex -cxr "bbc DDdas" "123"生成的正则表达式与 perl 和 rust 兼容生成的表达式与 Perl兼容,也与 Rust 的 regex crate 中的正则表达式解析器(1.9.0 或更高版本)兼容。其他正则表达式解析器或其他编程语言的相应库尚未经过测试支持 Unicode 符号完全符合 Unicode 标准15.0能正确处理由多个 Unicode 符号组成的图形元素友好的用户体验自动生成正则表达式:只需提供输入,grex 默认生成最具体的正则表达式,并与给定的输入完全匹配。使用详细模式生成在多个上缩进的更具可读性的表达式语法高亮显示,在支持的终端中提供更好的显示输出。发布于 2024-01-31 10:37・IP 属地广东RegEx正则表达式Rust(编程语言)​赞同 1​​添加评论​分享​喜欢​收藏​申请转载​文章被以下专栏收录pkgx-cmd

GTEx数据库简介(1) - 知乎

GTEx数据库简介(1) - 知乎切换模式写文章登录/注册GTEx数据库简介(1)HuaMD医学大数据分享医学大数据知识----医学大数据及其综合分析(四)Hua+医学大数据 出品(转载请注明出处链接,翻版必究)(HuaPlusMD通过整合多种人类和动物数据库,建立了可靠的大数据库,为您提供疾病动物模型和临床大数据综合分析。链接:https://www.huaplusmd.com)前言:“大数据”概念早已出现,目前我们对(医学)大数据了解有多少呢?本平台将对医学大数据进行系统的介绍,并对大数据综合分析进行分享(每周更新)。分享的内容将主要涵盖大数据库(基因、蛋白数据库等)/生物银行介绍(UK Biobank, Finnish Biobanks, China Kadoorie Biobank, BioBank Japan, TCGA, GWAS catalog,GTEx等),疾病动物模型数据库(如GeneNetwork, BXD),大数据库的综合使用(如Mendelian randomization),组学数据分析等。(分享的其他系列内容请见:https://www.huaplusmd.com/knowledge) 每个个体的不同的器官组织的基因(Gene)都是相同的,但为什么有的表型为肝脏组织,帮助人类代谢?有的是肌肉组织,帮助人类运动?其原因是,不同的人体组织表达的基因并不相同。GTEx项目,通过收集健康人体的不同组织样本,尝试了解人类不同组织/器官的特异性基因表达。 从本期开始,我们将介绍GTEx数据库。这是一个值得大家深度学习的数据库。GTEx项目,全称Genotype-Tissue Expression (基因型-组织表达) ,主要由美国NIH(国立卫生研究院)的公共基金计划连续资助了10年(2010-2019)的项目。(特别希望我国也能支持,这种长期的大队列的人体基础研究,能使非敏感数据开源,接受国际同行的评议。功在当代、利在千秋!) GTEx项目是用来研究人类不同组织的特异性基因表达和调节的。GTEx 项目最终的数据库(第八版,V8),包括来自于838位生前健康的人类捐献者的DNA数据(包含Whole Genome Sequencing (WGS) 和 Whole Exome Sequencing (WES));17382 份RNA-seq 数据,其来自于近1000个人类个体,涵盖54个不同组织器官部位(目前世界唯一能收集这么全的健康人体组织样本);以及2个来自捐献者血液和皮肤的细胞系。该数据库应用:· 评价不同组织特异性基因表达和调节;· 进行GWAS研究 (genome-wide association study);· 可以用来探索遗传变异对复杂疾病和特征的影响。应用举例:GTEx的研究人员,通过GTEx数据库,设计一种统计方法,称为PrediXcan,该方法能够通过基因序列,推测基因的活性或表达量;然后,PrediXcan能够将推测的基因活性和观测到的疾病特征相关联,从而预测疾病。PrediXcan已经成功地发现与多种疾病相关的特异基因,这些疾病包括 冠状动脉疾病、克罗恩病、类风湿性关节炎、 1 型糖尿病 和 双相情感障碍。 该项目创建了GTEx Portal(https://gtexportal.org/home/),该平台提供开放获取的数据,包括基因表达、QTLs 及 生理组织学 图片。 GTEx项目,也同时建立了自己的生物银行(https://gtexportal.org/home/biobank),包含来自约960位生前健康的捐赠者的组织标本的,包括肺脏、脑、胰腺、皮肤等等。如果需要,还可以申请获取留存的生物样本。GTEx联盟,在世界顶刊上Science, Nature上发表的代表性文章列表:· 2015年,GTEx项目发布了第一个阶段性成果,一次性在Science上发表3篇研究成果:The Genotype-Tissue Expression (GTEx) pilot analysis: Multitissue gene regulation in humansThe GTEx Consortium.Science. 8 May 2015. 348(6235):648-660. doi:10.1126/science. PMID: 25954001 The human transcriptome across tissues and individualsMelé M, Ferreira PG, Reverter F, DeLuca DS, Monlong J et al.Science. 8 May 2015. 348(6235):660-665. doi: 10.1126/science.aaa0355 Effect of predicted protein-truncating genetic variants on the human transcriptomeRivas MA, Pirinen M, Conrad DF, Lek M, Tsang EK et al.Science. 8 May 2015. 348(6235):666-669. doi:10.1126/science.1261877. · 2017年,GTEx项目发布了进一步成果,一次性在Nature发表4篇研究成果:Genetic effects on gene expression across human tissuesThe GTEx Consortium.Nature. 12 Oct 2017. 550: 204-213. Epub 11 Oct 2017. doi:10.1038/nature24277The impact of rare variation on gene expression across tissuesLi X, Kim Y, Tsang EK, Davis JR, Damani FN et al.Nature. 12 Oct 2017. 550: 239-243. Epub 11 Oct 2017. doi:10.1038/nature24267Landscape of X chromosome inactivation across human tissuesTukiainen T, Villani AC, Yen A, Rivas MA, Marshall JL et al.Nature. 12 Oct 2017. 550: 244-248. Epub 11 Oct 2017. doi:10.1038/nature24265Dynamic landscape and regulation of RNA editing in mammalsTan MH, Li Q, Shanmugam R, Piskol R, Kohler J et al.Nature. 12 Oct 2017. 550:249-254. Epub 11 Oct 2017. doi:10.1038/nature24041· 2019-2022年,GTEx项目又连续发布了项目的成果,在Science发表7篇研究成果:2022Single-nucleus cross-tissue molecular reference maps toward understanding disease gene functionEraslan G, et al.Science. 376 (abl4290), 13 May 2022. doi:10.1126/science.abl42902020The GTEx Consortium atlas of genetic regulatory effects across human tissuesThe GTEx Consortium.Science. 369 (1318-1330), 10 Sep 2020. doi:10.1126/science.aaz1776Cell type specific genetic regulation of gene expression across human tissuesKim-Hellmuth* S, Aguet* F, Oliva M, Muñoz-Aguirre M, Kasela S, et al.Science. 369 (eaaz8528), 10 Sep 2020. doi:10.1126/science.aaz8528Transcriptomic signatures across human tissues identify functional rare genetic variationFerraro* NM, Strober* BJ, Einson J, Abell NS, Aguet F, et al.Science. 369 (aaz5900), 10 Sep 2020. doi:10.1126/science.aaz5900Determinants of telomere length across human tissuesDemanelis K, Jasmine F, Chen LS, Chernoff M, Tong L, et al.Science. 369 (aaz6876), 10 Sep 2020. doi:10.1126/science.aaz6876The impact of sex on gene expression across human tissuesOliva* M, Muñoz-Aguirre* M, Kim-Hellmuth* S, Wucher V, Gewirtz ADH, et al.Science. 369 (aba3066), 10 Sep 2020. doi:10.1126/science.aba30662019RNA sequence analysis reveals macroscopic somatic clonal expansion across normal tissuesYizhak K, Aguet F, Kim J, Hess JM, Kübler K et al.Science. 07 June 2019. 364(6444). doi:10.1126/science.aaw0726 如果你可以看youtube视频,可以看一下Prof. Eric Lander (Funding director, Broad Institute) 等对GTEx的简单介绍:https://www.youtube.com/watch?v=PhK186A7Ryo---end---—如果喜欢,快分享给你的朋友们吧—关注公众号,更多精彩内容等着你!原文链接:https://www.huaplusmd.com/knowledgeHua+医学大数据 出品 (医学大数据综合分析,HuaPlusMD坚持专业和认真)。如果您有医学大数据综合分析方面需求欢迎联系我们:https://www.huaplusmd.com/往期回顾:医学大数据及其综合分析(总纲)医学大数据及其综合分析(一)—— GEO数据库介绍 (1)医学大数据及其综合分析(一)—— GEO数据库介绍 (2)医学大数据及其综合分析(二)—— BXD小鼠数据库介绍 (1)医学大数据及其综合分析(二)—— BXD小鼠数据库/GeneNetwork介绍 (2)医学大数据及其综合分析(二)—— BXD小鼠数据库/GeneNetwork介绍 (3)医学大数据及其综合分析(二)—— BXD小鼠数据库/GeneNetwork介绍 (4)医学大数据及其综合分析(三)—— eQTLGen Consortium数据库简介(1)医学大数据及其综合分析(三)—— eQTLGen Consortium数据库简介(2)医学大数据及其综合分析(X)—— 实例分析1:中年发福:人体代谢率 不背此锅新冠肺炎(COVID-19)的致死率参考文献:[1] https://commonfund.nih.gov/GTex.[2] https://gtexportal.org/home/发布于 2022-10-24 04:27大数据​赞同 18​​2 条评论​分享​喜欢​收藏​申请

WAF Server Error

WAF Server Error

很抱歉,您访问的源站暂时无法响应,请稍后重试或联系网站管理员

grex首页、文档和下载 - 正则表达式工具 - OSCHINA - 中文开源技术交流社区

grex首页、文档和下载 - 正则表达式工具 - OSCHINA - 中文开源技术交流社区

Gitee

资讯

专区

问答

活动

软件库

Tool

博客

培训

众包

登录

注册

开源软件库

/

正则表达式工具

/

grex

grex

收藏0

评论0

分享

微信

QQ

微博

纠错

grex 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!

grex 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!

2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!

2021 年度 OSC 中国开源项目评选 >>> 中场回顾

grex 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !

授权协议

Apache-2.0 License

开发语言

JavaScript

操作系统

跨平台

软件类型

开源软件

所属分类

程序开发、 正则表达式工具

开源组织

地区

不详

投 递 者

首席测试

适用人群

未知

收录时间

2021-11-10

软件首页

软件文档

官方下载

100.0

安全指数

概览

资讯

博客

问答

安全信息

软件简介

【开源中国 APP 全新上线】“动弹” 回归、集成大模型对话、畅读技术报告

Table of Contents

What does this tool do?

Do I still need to learn to write regexes then?

Current features

How to install?

4.1 The command-line tool

4.2 The library

How to use?

5.1 The command-line tool

5.2 The library

5.3 Examples

How to build?

How does it work?

Contributions

1. What does this tool do? Top ▲

grex is a library as well as a command-line utility that is meant to simplify the often

complicated and tedious task of creating regular expressions. It does so by automatically

generating a single regular expression from user-provided test cases. The resulting

expression is guaranteed to match the test cases which it was generated from.

This project has started as a Rust port of the JavaScript tool

regexgen written by

Devon Govett. Although a lot of further useful features

could be added to it, its development was apparently ceased several years ago. The plan

is now to add these new features to grex as Rust really shines when it comes to

command-line tools. grex offers all features that regexgen provides, and more.

The philosophy of this project is to generate the most specific regular expression

possible by default which exactly matches the given input only and nothing else.

With the use of command-line flags (in the CLI tool) or preprocessing methods

(in the library), more generalized expressions can be created.

The produced expressions are Perl-compatible regular expressions which are also

compatible with the regular expression parser in Rust's regex crate.

Other regular expression parsers or respective libraries from other programming languages

have not been tested so far, but they ought to be mostly compatible as well.

2. Do I still need to learn to write regexes then? Top ▲

Definitely, yes! Using the standard settings, grex produces a regular expression that is guaranteed

to match only the test cases given as input and nothing else.

This has been verified by property tests.

However, if the conversion to shorthand character classes such as \w is enabled, the resulting regex matches

a much wider scope of test cases. Knowledge about the consequences of this conversion is essential for finding

a correct regular expression for your business domain.

grex uses an algorithm that tries to find the shortest possible regex for the given test cases.

Very often though, the resulting expression is still longer or more complex than it needs to be.

In such cases, a more compact or elegant regex can be created only by hand.

Also, every regular expression engine has different built-in optimizations. grex does not know anything

about those and therefore cannot optimize its regexes for a specific engine.

So, please learn how to write regular expressions! The currently best use case for grex is to find

an initial correct regex which should be inspected by hand if further optimizations are possible.

3. Current Features Top ▲

literals

character classes

detection of common prefixes and suffixes

detection of repeated substrings and conversion to {min,max} quantifier notation

alternation using | operator

optionality using ? quantifier

escaping of non-ascii characters, with optional conversion of astral code points to surrogate pairs

case-sensitive or case-insensitive matching

capturing or non-capturing groups

fully compliant to newest Unicode Standard 13.0

fully compatible with regex crate 1.3.5+

correctly handles graphemes consisting of multiple Unicode symbols

reads input strings from the command-line or from a file

produces more readable expressions indented on multiple using optional verbose mode

optional syntax highlighting for nicer output in supported terminals

4. How to install? Top ▲

4.1 The command-line tool Top ▲

You can download the self-contained executable for your platform above and put it in a place of your choice.

Alternatively, pre-compiled 64-Bit binaries are available within the package managers Scoop

(for Windows), Homebrew (for macOS and Linux), MacPorts (for macOS), and Huber (for macOS, Linux and Windows).

Raúl Piracés has contributed a Chocolatey Windows package.

grex is also hosted on crates.io,

the official Rust package registry. If you are a Rust developer and already have the Rust

toolchain installed, you can install by compiling from source using

cargo, the Rust package manager.

So the summary of your installation options is:

( brew | cargo | choco | huber | port | scoop ) install grex

4.2 The library Top ▲

In order to use grex as a library, simply add it as a dependency to your Cargo.toml file:

[dependencies]

grex = "1.3.0"

5. How to use? Top ▲

Detailed explanations of the available settings are provided in the library section.

All settings can be freely combined with each other.

5.1 The command-line tool Top ▲

Test cases are passed either directly (grex a b c) or from a file (grex -f test_cases.txt).

grex is able to receive its input from Unix pipelines as well, e.g. cat test_cases.txt | grex -.

The following table shows all available flags and options:

$ grex -h

grex 1.3.0

© 2019-today Peter M. Stahl

Licensed under the Apache License, Version 2.0

Downloadable from https://crates.io/crates/grex

Source code at https://github.com/pemistahl/grex

grex generates regular expressions from user-provided test cases.

USAGE:

grex [FLAGS] [OPTIONS] ... --file

FLAGS:

-d, --digits Converts any Unicode decimal digit to \d

-D, --non-digits Converts any character which is not a Unicode decimal digit to \D

-s, --spaces Converts any Unicode whitespace character to \s

-S, --non-spaces Converts any character which is not a Unicode whitespace character to \S

-w, --words Converts any Unicode word character to \w

-W, --non-words Converts any character which is not a Unicode word character to \W

-r, --repetitions Detects repeated non-overlapping substrings and

converts them to {min,max} quantifier notation

-e, --escape Replaces all non-ASCII characters with unicode escape sequences

--with-surrogates Converts astral code points to surrogate pairs if --escape is set

-i, --ignore-case Performs case-insensitive matching, letters match both upper and lower case

-g, --capture-groups Replaces non-capturing groups by capturing ones

-x, --verbose Produces a nicer looking regular expression in verbose mode

--no-start-anchor Removes the caret anchor '^' from the resulting regular expression

--no-end-anchor Removes the dollar sign anchor '$' from the resulting regular expression

--no-anchors Removes the caret and dollar sign anchors from the resulting regular expression

-c, --colorize Provides syntax highlighting for the resulting regular expression

-h, --help Prints help information

-v, --version Prints version information

OPTIONS:

-f, --file Reads test cases on separate lines from a file

--min-repetitions Specifies the minimum quantity of substring repetitions

to be converted if --repetitions is set [default: 1]

--min-substring-length Specifies the minimum length a repeated substring must have

in order to be converted if --repetitions is set [default: 1]

ARGS:

... One or more test cases separated by blank space

5.2 The library Top ▲

5.2.1 Default settings

Test cases are passed either from a collection via RegExpBuilder::from()

or from a file via RegExpBuilder::from_file().

If read from a file, each test case must be on a separate line. Lines may be ended with either a newline \n or a carriage

return with a line feed \r\n.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["a", "aa", "aaa"]).build();

assert_eq!(regexp, "^a(?:aa?)?$");

5.2.2 Convert to character classes

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["a", "aa", "123"])

.with_conversion_of_digits()

.with_conversion_of_words()

.build();

assert_eq!(regexp, "^(\\d\\d\\d|\\w(?:\\w)?)$");

5.2.3 Convert repeated substrings

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["aa", "bcbc", "defdefdef"])

.with_conversion_of_repetitions()

.build();

assert_eq!(regexp, "^(?:a{2}|(?:bc){2}|(?:def){3})$");

By default, grex converts each substring this way which is at least a single character long

and which is subsequently repeated at least once. You can customize these two parameters if you like.

In the following example, the test case aa is not converted to a{2} because the repeated substring

a has a length of 1, but the minimum substring length has been set to 2.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["aa", "bcbc", "defdefdef"])

.with_conversion_of_repetitions()

.with_minimum_substring_length(2)

.build();

assert_eq!(regexp, "^(?:aa|(?:bc){2}|(?:def){3})$");

Setting a minimum number of 2 repetitions in the next example, only the test case defdefdef will be

converted because it is the only one that is repeated twice.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["aa", "bcbc", "defdefdef"])

.with_conversion_of_repetitions()

.with_minimum_repetitions(2)

.build();

assert_eq!(regexp, "^(?:bcbc|aa|(?:def){3})$");

5.2.4 Escape non-ascii characters

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["You smell like ."])

.with_escaping_of_non_ascii_chars(false)

.build();

assert_eq!(regexp, "^You smell like \\u{1f4a9}\\.$");

Old versions of JavaScript do not support unicode escape sequences for the astral code planes

(range U+010000 to U+10FFFF). In order to support these symbols in JavaScript regular

expressions, the conversion to surrogate pairs is necessary. More information on that matter

can be found here.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["You smell like ."])

.with_escaped_non_ascii_chars(true)

.build();

assert_eq!(regexp, "^You smell like \\u{d83d}\\u{dca9}\\.$");

5.2.5 Case-insensitive matching

The regular expressions that grex generates are case-sensitive by default.

Case-insensitive matching can be enabled like so:

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["big", "BIGGER"])

.with_case_insensitive_matching()

.build();

assert_eq!(regexp, "(?i)^big(?:ger)?$");

5.2.6 Capturing Groups

Non-capturing groups are used by default.

Extending the previous example, you can switch to capturing groups instead.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["big", "BIGGER"])

.with_case_insensitive_matching()

.with_capturing_groups()

.build();

assert_eq!(regexp, "(?i)^big(ger)?$");

5.2.7 Verbose mode

If you find the generated regular expression hard to read, you can enable verbose mode.

The expression is then put on multiple lines and indented to make it more pleasant to the eyes.

use grex::RegExpBuilder;

use indoc::indoc;

let regexp = RegExpBuilder::from(&["a", "b", "bcd"])

.with_verbose_mode()

.build();

assert_eq!(regexp, indoc!(

r#"

(?x)

^

(?:

b

(?:

cd

)?

|

a

)

$"#

));

5.2.8 Disable anchors

By default, the anchors ^ and $ are put around every generated regular expression in order

to ensure that it matches only the test cases given as input. Often enough, however, it is

desired to use the generated pattern as part of a larger one. For this purpose, the anchors

can be disabled, either separately or both of them.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["a", "aa", "aaa"])

.without_anchors()

.build();

assert_eq!(regexp, "a(?:aa?)?");

5.2.9 Syntax highlighting

⚠ The method with_syntax_highlighting() may only be used if the resulting regular expression is meant to

be printed to the console. It is mainly meant to be used for the command-line tool output.

The regex string representation returned from enabling this setting cannot be fed into the

regex crate.

use grex::RegExpBuilder;

let regexp = RegExpBuilder::from(&["a", "aa", "123"])

.with_syntax_highlighting()

.build();

5.3 Examples Top ▲

The following examples show the various supported regex syntax features:

$ grex a b c

^[a-c]$

$ grex a c d e f

^[ac-f]$

$ grex a b x de

^(?:de|[abx])$

$ grex abc bc

^a?bc$

$ grex a b bc

^(?:bc?|a)$

$ grex [a-z]

^\[a\-z\]$

$ grex -r b ba baa baaa

^b(?:a{1,3})?$

$ grex -r b ba baa baaaa

^b(?:a{1,2}|a{4})?$

$ grex y̆ a z

^(?:y̆|[az])$

Note:

Grapheme y̆ consists of two Unicode symbols:

U+0079 (Latin Small Letter Y)

U+0306 (Combining Breve)

$ grex "I ♥ cake" "I ♥ cookies"

^I ♥ c(?:ookies|ake)$

Note:

Input containing blank space must be

surrounded by quotation marks.

The string "I ♥♥♥ 36 and ٣ and ." serves as input for the following examples using the command-line notation:

$ grex

^I ♥♥♥ 36 and ٣ and \.$

$ grex -e

^I \u{2665}\u{2665}\u{2665} 36 and \u{663} and \u{1f4a9}\u{1f4a9}\.$

$ grex -e --with-surrogates

^I \u{2665}\u{2665}\u{2665} 36 and \u{663} and \u{d83d}\u{dca9}\u{d83d}\u{dca9}\.$

$ grex -d

^I ♥♥♥ \d\d and \d and \.$

$ grex -s

^I\s♥♥♥\s36\sand\s٣\sand\s\.$

$ grex -w

^\w ♥♥♥ \w\w \w\w\w \w \w\w\w \.$

$ grex -D

^\D\D\D\D\D\D36\D\D\D\D\D٣\D\D\D\D\D\D\D\D$

$ grex -S

^\S \S\S\S \S\S \S\S\S \S \S\S\S \S\S\S$

$ grex -dsw

^\w\s♥♥♥\s\d\d\s\w\w\w\s\d\s\w\w\w\s\.$

$ grex -dswW

^\w\s\W\W\W\s\d\d\s\w\w\w\s\d\s\w\w\w\s\W\W\W$

$ grex -r

^I ♥{3} 36 and ٣ and {2}\.$

$ grex -er

^I \u{2665}{3} 36 and \u{663} and \u{1f4a9}{2}\.$

$ grex -er --with-surrogates

^I \u{2665}{3} 36 and \u{663} and (?:\u{d83d}\u{dca9}){2}\.$

$ grex -dgr

^I ♥{3} \d(\d and ){2}{2}\.$

$ grex -rs

^I\s♥{3}\s36\sand\s٣\sand\s{2}\.$

$ grex -rw

^\w ♥{3} \w(?:\w \w{3} ){2}{2}\.$

$ grex -Dr

^\D{6}36\D{5}٣\D{8}$

$ grex -rS

^\S \S(?:\S{2} ){2}\S{3} \S \S{3} \S{3}$

$ grex -rW

^I\W{5}36\Wand\W٣\Wand\W{4}$

$ grex -drsw

^\w\s♥{3}\s\d(?:\d\s\w{3}\s){2}{2}\.$

$ grex -drswW

^\w\s\W{3}\s\d(?:\d\s\w{3}\s){2}\W{3}$

6. How to build? Top ▲

In order to build the source code yourself, you need the

stable Rust toolchain installed on your machine

so that cargo, the Rust package manager is available.

git clone https://github.com/pemistahl/grex.git

cd grex

cargo build

The source code is accompanied by an extensive test suite consisting of unit tests, integration

tests and property tests. For running them, simply say:

cargo test

7. How does it work? Top ▲

A deterministic finite automaton (DFA)

is created from the input strings.

The number of states and transitions between states in the DFA is reduced by applying

Hopcroft's DFA minimization algorithm.

The minimized DFA is expressed as a system of linear equations which are solved with

Brzozowski's algebraic method,

resulting in the final regular expression.

8. Contributions Top ▲

Krzysztof Zawisła has written JavaScript bindings. Check out grex.js.

Maciej Gryka has created https://regex.help where you can try out grex in your browser.

In case you want to contribute something to grex, I encourage you to do so.

Do you have ideas for cool features? Or have you found any bugs so far?

Feel free to open an issue or send a pull request. It's very much appreciated. :-)

展开阅读全文

代码

评论

点击引领话题

发布并加入讨论

给软件打分:

暂无内容

{{o.author.name}}

发表了博客

{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}

{{parseInt(o.viewCount) | bigNumberTransform}}

微信

QQ

微博

举报

没有更多内容

暂无内容

{{o.author.name}}

发表了问答

{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}

{{parseInt(o.viewCount) | bigNumberTransform}}

微信

QQ

微博

举报

没有更多内容

暂无内容

暂无内容

Awesome 软件

换一换

.NET MAUI - .NET 跨平台 UI 框架

TencentOS Kernel - 云场景服务器操作系统

Alpine Linux - 面向安全的轻量级 Linux 发行版

白泽Baize - 使用 LoRA 训练的大语言模型

ripgrep - 正则表达式搜索工具

Stanford Alpaca - 指令调优的 LLaMA 模型

野火IM - 即时通讯系统

Compass - 搜索引擎

Fluent Reader - Fluent UI 构建的 RSS 阅读器

XTrackCAD - CAD软件

Seppiko Chart - Java 条形码库

Mageia - Linux 发行版

Zsh - Linux Shell 环境

OpenXava - Java 快速 Web 开发套件

碎言静态博客

FreeRDP - 远程桌面协议(RDP)工具

Consent-O-Matic - cookie 弹窗自动处理扩展

Unilang - 现代通用目的编程语言

OpenLLaMA - LLaMA 大语言模型的开源复现版本

RapidOCR - 跨平台 OCR 库

Fathom - 使用 Go 和 Preact 构建的网站分析工具

MuseScore - 免费的作曲与乐谱软件

Pyroscope - 连续分析平台

循环洞穴 2 - Cavernous 汉化版

Saltcorn - 无代码数据库管理器 Web 应用程序

GPT Neo - 开源 GPT 模型

KubeTEE - 云原生大规模集群化机密计算框架

华佗GPT - 开源中文医疗大模型

wachy - 用于 Linux 的动态跟踪分析器

Anbox - 在 Linux 系统中运行 Android 应用

热门内容

更多精彩内容

LFOSSA 祝大家女神节快乐!助力女性开源职业发展!

我的历时一年的独立开发故事

GreptimeDB v0.7 发布 — 全面支持云原生监控场景

野火IM 1.2.3 已经发布,即时通讯系统

一个使用 Java 开发的 LLM 应用开发框架,Agents-Flex alpha.2 发布

EmbedXrpc V5.0.0 已经发布,用于单片机场景的“gRPC”

2023 年 DevOps 报告:文化、用户中心性和技术能力驱动组织成功

AI 加速引擎 PAI-TorchAcc:整体介绍与性能概述

KCL v0.8.0 重磅发布 - 融汇社区生态,助力配置体验!

快手启动鸿蒙原生应用开发

"Java 将继续存在",60% 的公司计划扩招 Java 开发人员

如果企图在人工智能上搞“小院高墙”,将会犯下新历史错误

星动纪元开源人形机器人训练框架 Humanoid-Gym

微信即将推出原生 Linux 版本

开源日报 | Google=开源,好评;Microsoft=闭源收入还低,差评

WFS 文件存储系统 v1.0.1 发布

Syncthing 1.27.4 发布,连续文件同步工具

【比较 ORM 操作数据】总结

Node.js 新版官网开启 Beta 测试:全新现代化 UI、优化交互

零一万物开源 Yi-9B,代码数学综合能力全面增强

Pulsar3.0 升级指北

EasyMR:为 AI 未来赋能,打造弹性大数据引擎的革命

“完美的汽车音频体验就像坐在小型音乐厅”——对话赛因芯微CEO吴健

基于Apache SeaTunnel构建CDC数据同步管道

Java 函数方法指南:如何获取给定日期的月份最后一天

社区供稿|完蛋!我被LLM包围了!快来玩坏大模型!

速看!Milvus JavaScript 客户端入门级使用指南

最佳实践:TiDB 业务写变慢分析处理

TiDB x 安能物流丨打造一栈式物流数据平台

业务安全情报第22期 | 不法分子为何盗刷企业短信?

智能销售拓客系统:破解企业营销困局的新钥匙

院士专家任高级顾问,龙蜥生态日见成熟

今天北京见啦!全面拥抱智算时代分论坛等你来 | 2023龙蜥操作系统大会

撕歌的在线K歌体验优化实践

LLM 回答更加准确的秘密:为检索增强生成(RAG)添加引用源

一篇文章彻底搞懂 TiDB 集群各种容量计算方式

对话阿里云何亚明:多媒体的未来,正迎面未知的高速列车

初探分布式链路追踪

「MySQL 5.7 停服讨论区」上线,来这里畅所欲言~

OpenAI,请重新思考 Retrieval Assistant 的方案

独立&安全 | 企业选择系统定制化开发的最主要优势

Amoro 0.6.0 发布:集成 Kubernetes 与 S3,支持 Apache Paimon

TiDB 社区智慧合集丨TiDB 相关 SQL 脚本大全

社区供稿 | 推理 1760 亿参数的 BLOOMZ,性能时延仅 3.7 秒

当一个程序员决定穿上粉裤子

深入浅出JVM(十五)之垃圾收集器(上篇)

社区供稿 | 如何在 Hugging Face 上使用 InternLM-20B?

10分钟从实现和使用场景聊聊并发包下的阻塞队列

工单质检上线提升企业IT服务质量管理,智能服务能力再添新翼!甄知燕千云全新版本V1.26.0发布!

水下图像质量评价与画质增强研究

阿里滴滴之后,腾讯视频也崩了!网友追问:下一个是谁?

顶象Web 3业务安全方案亮相“AWS解决方案日”

NAT协议的实现方式

“触”手可及的视听新体验 ——触觉反馈生态、标准及新进展

巧用指标平台DataIndex,五步法轻松实现指标管理

手把手系列!无需 OpenAI 即可搭建 RAG 应用

COSCon'23 主论坛特色——闪电演讲

诈骗分子投递的“大闸蟹礼品卡”,快递公司能提前发现识别嘛?

COSCon'23 社区召集令

2024首场沙龙|上海 · 得物技术沙龙-「稳定生产」专场报名开启!

LLM在电商推荐系统的探索与实践

开发Java应用时如何用好Log

客服订单详情页体验升级之路

MySQL的优化利器:索引条件下推,千万数据下性能提升273%

任何人不知道定制软件的这些优点我都会伤心的!

关于实施数据治理,企业需要做哪些?

开发者实战 | 基于 OpenVINO™ 打造一站式光学字符识别 & 检测大师(OCR-Master)

2023 年备受瞩目的向量数据库赛道盘点出炉

Apache 官方限定社区周边,Community Over Code 亚洲大会参会礼包抢鲜看!

FlashAttention2原理解析以及面向AIGC的加速实践

MediaBox,行业音视频数字化再加速

Alluxio DORA:新一代Alluxio架构

社区供稿 | 多项长文本任务第一,揭秘 Ziya-Reader 训练技术:注意力增强

oracle数据导入

关于GreatSQL字符集的总结

重磅发布|《 AutoMQ 白皮书》与《 RocketMQ 实战精粹》正式上线

KCC Singapore 邀您参加 2023 ETH Hangzhou 黑客松

开发一个高效的电商网站系统,这几点你必须懂!

数字中国背景下,企业数字化转型需要“强IT”

上海站 | 数据库运维有话聊,谈谈你了解的灾备实践

PingCAP 被评为 Translytical Data Platforms 2023 全球技术领导者

大规模流量下的云边端一体化流量调度体系

什么是网络地址转换协议

KCC@成都:COSCon 2023 Open Start 读书会

活动 | GreatSQL 受邀「3306π」北京站 拓展数据库朋友圈 (附 PPT 下载)

依靠HDR-VMAF,Netflix的HDR视频已全部实现动态优化

OceanMind海睿思入选《2023大数据产业年度创新技术突破奖》,并蝉联多项图谱

叫好不叫座?Arm、英特尔、AMD 等 5 位技术大咖畅聊机密计算技术

OceanMind海睿思受邀出席2023长三角数字化大会,斩获两项数字化转型年度大奖

活动报名|AutoMQ x 阿里云云原生创新论坛(2024.03.09)见证“新一代云原生 Kafka ”重磅发布!

淘宝用户体验VOC标签体系

网络空间测绘在安全领域的应用(下)

融云荣获艾媒咨询「2023 年中国新经济卓越成就奖」

“分布式透明化”在杭州银行核心系统上线之思考

基于 Apache Kyuubi 实现分布式 Flink SQL 网关

距离LiveVideoStackCon2023深圳站还有1天!

Blackhat Europe 2023 | 百度安全揭秘多平台NPU背后的安全风险

大型集团企业数据治理方案,以“应用驱动”的数据治理策略 | 行业方案

「专题速递」多媒体内容理解、视频云大模型算法实践、AI算力云的探索、FreeSWITCH对接人工智能

全站热门评论

屮殖 2024-03-07 15:26

汉代盐铁论就论断和实践的产业政策问题,往往被庸人自以为是的小聪明批判。程序员很多人是理科生,很多人从来不看历史。

c

cassan 2024-03-01 22:19

开源了,我们国内的公司又可以申请知识产权了

有你何须仰望 2024-03-07 15:46

越看越像新版QQ NT

2

2cong 2024-02-26 11:21

如果让我抄,我就会!

jobell 2024-03-07 17:02

微信开发工具赶紧推出linux版本吧

高排量低炭烧 2024-02-26 21:29

鸿蒙只是人家现学的,人家本来薪水就这么高,而不是新手培训完就值这个数

osc_56137622 2024-03-07 17:34

赞:+1:

skykainls 2024-03-07 16:13

还是逃不过东半球最强法务部的子弹

屮殖 2024-03-07 15:41

小米的新闻,主角却是华为,这说明谁更重要,以至于敌人想除之而后快呢?

d

dwcz 2024-02-18 22:12

中国法治的水平:二创可以演绎原创,三创不能演绎二创。

小xu中年 2024-03-07 16:31

……

J

JK_STAR 2024-03-07 16:08

QT写的

朋克 2024-02-28 11:36

这才是正常的盈利模式

monkey_cici 2024-02-26 11:39

开源系统还是要看民企的深度统信和华为欧拉...

小肥侠 2024-02-19 17:51

所以将开源软件打包到应用商店,是真的有市场。

小呆呆的星空 2024-03-07 17:19

有钱人当然不要做程序员,草根出身做程序员待遇是不错的

魔力猫 2024-02-01 09:48

开源不是不可以收费,基本上也没人认为开源项目里有收费项目是什么十恶不赦的罪过。问题在于,你要合理合法,要符合开源的道德。最近的事件,要么是某和尚绑票,不合理不合法更没道德,绑票拿赎金。要么就是这位,明明合法的事情,偏偏发个歧视公告,张嘴白嫖闭嘴白嫖,过嘴瘾有意思吗?开源生意,哪怕你心理一万个不愿意,但是既然你做了这个生意,伪君子人设好歹你不干的时候再扔呀,一会儿伪君子一会儿真小人,觉得不找骂才怪。

大星星 2024-03-07 15:29

有没可能是故意的

RobotPainter 2024-03-07 17:21

下意识navbar里找Pricing。。。

老盖 2024-02-01 14:11

windows没希望了,一群阿三,越做越差

u

unameuname 2024-02-19 14:02

第一次钓鱼,别TM给我鱼竿,我只要鱼。

redblueme 2024-03-07 16:07

牛逼,有空试一下

大风起兮9527 2024-02-06 08:57

这事没啥好讨论的啊,代码如果开始的时候是开源,那么你有闭源的权利,但是要从声明之后的版本开始,不能回溯。文档也是如此,但是有一点,如果文档虽然没有声明开源,但是自己在公开场合发布过,你可以建议请求不要随意传播,但是不能强硬的禁止。关于白嫖,这个说法过分了,对于这些想要商业化的项目,开源伊始的初心,无非是面推广费、免费测试。各有所图,不要互相指责。

天朝八阿哥 2024-02-29 10:32

虽然不懂,但表示很赞,比随便就冠以“国产”“自主研发”之类的让人舒心太多了

91winter 2024-03-07 17:03

可能是钓鱼的吧~

k

kylexy 2024-02-26 10:38

大实话。。。。

neou 2024-03-07 16:32

不要什么都让国家管,支不支持Linux要让企业说了算,让市场说了算。

osc_94406955 2024-03-01 09:29

预计该问题会在 24 小时内彻底解决............. 今天3月1日了,bug神奇的消失

魔力猫 2024-02-01 14:19

最近这些事件的主角,初心绝对不是什么为了创造啥,为的只是赚钱。开源只是赚钱手段,而且是觉得自己为了钱放弃很多的那种心态,心理先把自己当成了牺牲者,然后认为所有人都应该补偿自己。不拿钱补偿就是忘恩负义的白眼狼!

风一样的Man 2024-03-06 10:50

我还没开始用, 你就砍掉了

yl-yue 2024-02-18 13:49

操作也是相当炸裂,原来还可以这样玩,字太多了没读透,我的理解,就算是鸡肋专利也够他们吹嘘了,要是限制性专利,那是相当牛逼,开源行业要炸。

小xu中年 2024-03-07 16:27

m

moon_red 2024-03-07 18:09

第一个Warning是在Wayland环境下用X11的qt出现的,不影响使用。libva和iHD_drv_video.so都是视频硬件加速,可能是你libva没配好

t

tedx53 2024-02-27 09:42

高考状元的试卷给我抄,我也能轻松上清华

屮殖 2024-03-07 15:47

你说的很对,能源的确是另一个很重要的方面。但是AI和挖矿不一样,他的使用是要比训练少数量级差别的算力的。而AI能达到的功能是由训练实现的。目前情况下,电力很多国家都够支撑,但是芯片实现的算力全世界只有为数不多的AI公司才能有条件训练大模型了。对比小模型就能看出来,小模型是个人能训练的。

zhangjinsongok 2024-02-01 16:29

开源世界的孤胆英雄。

我的ID是jmjoy 2024-03-07 17:45

让市场说了算明显不行,某些企业利用资本先发优势大搞垄断,霸占生态位不干人事,店大欺客,早就应该治治了。

爱吃生梨 2024-01-31 15:35

百小僧果然是刷新中国开源底线里程碑式的人物,这不追随者来了。而且从.net扩散到java

魔力猫 2024-02-01 09:35

这篇说的好听,但你心里,公有制就是白嫖,你之前公告写着“ioGame21 在线文档依旧采用自愿付费模式策略。简单的说,我们提供了最新在线文档的白嫖方式,如果你打算跟进框架最新版本的,依旧可以选择白嫖在线文档。”,“综上,想继续白嫖的,请跟进最新版本。”不是吗?这是什么理念?我看更像精神分裂的理念,伪君子和真小人之间来回切换,嘴上都不一致。

姜鹏飞 2024-03-07 17:15

漂亮

Yoona520 2024-02-24 17:44

国外那个P站的技术水准可不低,毕竟服务全世界除CN之外的人

fyf187 2024-03-07 16:00

内容可能含有违规信息

CheckStyle 2024-02-21 18:45

关键是什么业务?10个人,2023年,一年,赚2000多万,泼天的富贵啊

小xu中年 2024-03-07 16:31

优秀

o

osc_91229770 2024-02-18 12:03

这也申请专利,这个不是正常crud,常规操作吗

小xu中年 2024-03-07 16:29

拥抱信创

记得小蘋初见123 2024-02-29 16:53

百小僧,出列

gmg 2024-02-26 22:23

有点好奇为什么发布这种表面看起来吸引眼球的标题。

gitlinux 2024-03-07 16:12

postrm脚本,if语句忘写 fi 啦,手动修正一下即可

闲大赋 2024-02-18 20:49

我对此专利的解读『 https://my.oschina.net/xiandafu/blog/11043929』

屮殖 2024-03-07 15:38

我人品咋了?就事论事就是人品有问题?对我简介都这么关心?我都忘了自己写了什么了。是不是爱一点点国,就是眼中钉了?是不是爱国必须表现装给你们看才行?评论一个社会事件怎么搞到爱国程度了?我就事论事,让某些人不要总是用嫉妒心看待别人,只能害了自己,难道不对?

Z生生不息 2024-01-31 18:33

没有人要求你必须要维护必须开源。但是你有权力要求用户“不得以任何形式传播及公开”吗?这是 AGPL 开源协议所允许的吗?如果你连开源协议都搞不清楚,早点把仓库归档吧。整得跟小学生耍流氓一样。

simba_sailor 2024-03-07 17:03

有安装了今天更新的修复登陆问题的版本,可能 登陆,可以有聊天历史同步。现在主要的问题是中文输入不了。

luwenhua 2024-03-05 18:18

其实用用惯了,比windows省心多了

屮殖 2024-03-07 15:42

啥意思?你看看大毛那样不就知道了?我们还有个任务没完成呢,毛子那种待遇我们几乎是必然的事,不要早做准备?

RobotPainter 2024-03-07 17:40

我感觉挺好的,这就是没有小院高墙的体现

Yokesily 2024-03-07 18:43

看这截图,很多杀毒防火墙软件都很缺乏用户体验设计!又红色感叹号告诉危险,又绿色告诉已验证,所以这弹窗到底想告诉用户什么??从用户角度看,用户想知道的是~谁发起什么操作,就比如xx软件创建了test服务,或者用户主动创建了test服务,提示内容要关键到位啊

dantezhu 2024-02-28 11:20

那,这就叫专业。

y

yfxuwork 2024-03-07 16:42

linuxmint下打开后扫码登录失败, 不过希望之后能像qq一样出个appimage的包。 多方便。

J

Jason909 2024-03-07 15:43

“还有 84% 的 IntelliJ IDEA 用户表示,他们在 Java 开发实践中还使用过其他 IDE,其中 VSCode 是最常见的选择。”Eclipse的第二还能保多久?

软件作者

本软件还没有认证的作者

认证为作者

邀请作者认证

此软件还没有被作者认证,快来邀请作者认证吧!

成功邀请奖励:

开源伯乐勋章

专属邀请文案:

你的软件 “grex” 被开源中国社区收录啦,快点击 https://www.oschina.net/p/grex 认证为软件作者吧!

复制邀请文案

同类软件推荐

更多

Vectorscan高性能正则表达式匹配库的可移植分支

Vectorscan 是英特尔 Hyperscan 的一个分支,修改后可以在更多的平台上运行。目前ARM NEON/ASIMD已100%实现功能,Power VSX正在开发中。ARM SVE2将...

Hyperscan高性能的多正则表达式匹配库

Hyperscan是一个高性能的多正则表达式匹配库。它遵循常用libpcre库的正则表达式语法,但它是一个具有自己的C API的独立库。 Hyperscan使用混合自动机技术允许同时匹配大量(多...

homebridge-http-switch

homebridge-http-switch Plugin homebridge-http-switch is a Homebridge plugin with which you can co...

npegPEGs for Nim, another take

"Because friends don't let friends write parsers by hand" NPeg is a pure Nim pattern matching lib...

GitMAD

GitMAD (Git Monitor, Alert, Discover) GitMAD is a full stack application that monitors Github for...

热门资讯

1

黄仁勋:别让你的孩子长大后成为程序员

2

Visual Studio Code 1.87 发布,语音听写

3

开源中国 APP 全新上线:“动弹”回归、集成大模型对话、畅读技术报告

4

马斯克起诉 OpenAI 及其 CEO 奥特曼,要求公司恢复开源状态

5

倒了一个 Yuzu,还有千千万万个“转世”开源模拟器

6

向使当时真开源,小人/君子有谁知?某开源账号引发众怒

7

微信即将推出原生 Linux 版本

8

全球最流行开源 Switch 模拟器 Yuzu 删除代码仓库、向任天堂支付 240 万美元

9

新款 MacBook Air:搭载 M3 芯片、可外接 2 台显示器、全球最好的 AI 消费级笔记本电脑

10

织梦 CMS “混沌”往事二十年

0 评论

0 收藏

微信

QQ

微博

分享

登录后可查看更多优质内容

使用微信快捷登录

OSCHINA 社区

关于我们

联系我们

加入我们

合作伙伴

Open API

在线工具

Gitee.com

企业研发管理

CopyCat-代码克隆检测

实用在线工具

国家反诈中心APP下载

攻略

项目运营

Awesome 软件(持续更新中)

QQ群

229767317

公众号

视频号

©OSCHINA(OSChina.NET)

工信部

开源软件推进联盟

指定官方社区

社区规范

深圳市奥思网络科技有限公司版权所有

粤ICP备12009483号

顶部

grex | x-cmd pkg | 命令行工具和 Rust 库,用于从用户提供的测试用例生成正则表达式

grex | x-cmd pkg | 命令行工具和 Rust 库,用于从用户提供的测试用例生成正则表达式

Skip to content X-CMD| pkgMain Navigation上手指南1min包模块主题资源 Install Manual Awesome 变更日志Hub价格方案搜索K简体中文 English 在 GitHub 上星标我们目录返回顶部 Sidebar Navigation Shellbatexagprocshyperfinebusyboxusql 数据处理jqyqxsvcsvkitdaseltrdsqltrafilatura7zazstdupxfzfrgsdgrexdifftpandocqrencodehorcruxmicrosqlite3pypinyincsviewfxjlessfanyifranc-clijieba 文件系统fdlfdufdustduatokeirclonetrash-cli 编程语言pythonnodedenobuntsxgogoreleaserperlrakujavamawk 网络aria2curlhurlhttpxmosquittoncatnmapnpingsocattraceroutewebsocatdoggocrocmagic-wormholepublic-ip-cliffuffrpspeedtest-cli 多媒体ffmpegaggmagickpdfcputermsvgmermaid-cliascii-image-converter 安全opensslskatesmartctllynisosquery Gitact_runnerbitghgitleaksgituilazygitsoft-serveteatigczg 终端glowgotopgumhelixshtristmuxvhsasciinemazellijzeniththefucknorwegianbluehowdoihaxor-newsddgr 容器bwraphelmminikubectop 云服务aliyun 数据库datasette AIllm SSHxxh-xxh todo-240304hexylwtfutilresticbrootbeetspywalatuinxhtermsharklazydocker todo-240305invoiceshodantmuxpsncliruffborerebound-clibedgopassnasa-clixonshchatgptwatchexecbottomnavifselectncpliteclividdychezmoiactjcmonolithbrookhttpieetcddnstwistyttkopiabpytopismcgenactonefetcht-getdryfkill-clislim todo-240306ezastegcloakchatbladegpt-engineerhow2caddyohakeepjupyterlabinvokeemojeasy-sharingdoitcertbotmurexzshasshngxtopsyftpipxherokubenthosgallery-dlttydwebtorrent-clinfpmjqpmdtsqlgiteapm2duckduckgo_searchcurliegpinggojqshfmtsqheyloadtestdiskusagebcatcloudlistlefthookgrex - 命令行工具和 Rust 库,用于从用户提供的测试用例生成正则表达式grex ​命令行工具和 Rust 库,用于从用户提供的测试用例生成正则表达式简介 ​grex 是一个旨在简化创作正则表达式的复杂且繁琐任务的库和命令行程序。这个项目最初是 Devon Govett 编写的 JavaScript 工具 regexgen 的 Rust 移植。但 regexgen 在几年前停止了开发。现在 grex 提供了 regexgen 提供的所有功能,还增加了许多新的功能。首次用户 ​本文的 demo 展现了使用 grex 生成 [a-f] 正则表达式,以及使用可读性更好的方式打印输出。x-cmd 也提供了1分钟教程可以帮你快速入门。生成的正则表达式与 perl 和 rust 兼容 ​生成的表达式与 Perl 兼容,也与 Rust 的 regex crate 中的正则表达式解析器(1.9.0 或更高版本)兼容。其他正则表达式解析器或其他编程语言的相应库尚未经过测试支持 Unicode 符号 ​完全符合 Unicode 标准15.0能正确处理由多个 Unicode 符号组成的图形元素友好的用户体验 ​自动生成正则表达式:只需提供输入,grex 默认生成最具体的正则表达式,并与给定的输入完全匹配。使用详细模式生成在多个上缩进的更具可读性的表达式语法高亮显示,在支持的终端中提供更好的显示输出。进一步阅读 ​项目托管在 GitHub 上,里面的 README 文档提供了详细的参数功能和使用说明。您还可以通过 Demo website,将您提供的测试用例中生成匹配的正则表达式。x grexx env usex env try直接使用:

自动下载安装包并在本地展开。

直接运行软件包。

shx grex全局安装:

自动下载安装包并在本地展开。

自动将执行文件软链接到 x-cmd 的 bin 目录下。

当前所有打开的 Shell 都能直接输入命令名使用。

shx env use grex临时安装:

自动下载安装包并在本地展开。

将所在包的安装目录的 bin 目标临时加入到当前 Shell 的 $PATH 变量。

至此,当前 Shell 可直接输入命令名使用。可用于临时使用或决定是否全局安装前尝试该软件包。

shx env try grexhttps://github.com/pemistahl/grex 许可证MIT版本v1.4.4 稳定版软件包安装支持 x64 LinuxDarwinWindows ARM64 LinuxDarwin二进制包文件来源 官方源二次打包https://github.com/x-cmd-build/grex/releases https://npmjs.com/package/@x-cmd-pkg/grex https://npmmirror.com/package/@x-cmd-pkg/grex 相关链接1mingrex模块`x env` => 文档 上一篇sd下一篇 difft X-CMD AGPL 3.0 Licensed 导航1min 模块 包 主题 下载手册 命令手册 Awesome 关于联系我们 变更日志 资源GitHub Gitee GitCode © 2022-2024 李均豪(Li Junhao) 版权所有粤ICP备2021166893号-1

grex | x-cmd 1min | 命令行工具和 Rust 库,用于从用户提供的测试用例生成正则表达式

grex | x-cmd 1min | 命令行工具和 Rust 库,用于从用户提供的测试用例生成正则表达式

Skip to content X-CMD| 1minMain Navigation上手指南1min包模块主题资源 Install Manual Awesome 变更日志Hub价格方案搜索K简体中文 English 在 GitHub 上星标我们目录返回顶部 Sidebar Navigation Shellbatexagprocshyperfinebusyboxusql 数据处理jqyqxsvcsvkitdaseltrdsqltrafilatura7zazstdupxfzfrgsdgrexdifftpandocqrencodehorcruxmicrosqlite3pypinyincsviewfxjlessfanyifranc-clijieba 文件系统fdlfdufdustduatokeirclonetrash-cli 编程语言pythonnodedenobuntsxgogoreleaserperlrakujavamawk 网络aria2curlhurlhttpxmosquittoncatnmapnpingsocattraceroutewebsocatdoggocrocmagic-wormholepublic-ip-cliffuffrpspeedtest-cli 多媒体ffmpegaggmagickpdfcputermsvgmermaid-cliascii-image-converter 安全opensslskatesmartctllynisosquery Gitact_runnerbitghgitleaksgituilazygitsoft-serveteatigczg 终端glowgotopgumhelixshtristmuxvhsasciinemazellijzeniththefucknorwegianbluehowdoihaxor-newsddgr 容器bwraphelmminikubectop 云服务aliyun 数据库datasette AIllm SSHxxh-xxh todo-240304hexylwtfutilresticbrootbeetspywalatuinxhtermsharklazydocker todo-240305invoiceshodantmuxpsncliruffborerebound-clibedgopassnasa-clixonshchatgptwatchexecbottomnavifselectncpliteclividdychezmoiactjcmonolithbrookhttpieetcddnstwistyttkopiabpytopismcgenactonefetcht-getdryfkill-clislim todo-240306ezastegcloakchatbladegpt-engineerhow2caddyohakeepjupyterlabinvokeemojeasy-sharingdoitcertbotmurexzshasshngxtopsyftpipxherokubenthosgallery-dlttydwebtorrent-clinfpmjqpmdtsqlgiteapm2duckduckgo_searchcurliegpinggojqshfmtsqheyloadtestdiskusagebcatcloudlistlefthookgrex ​ 命令行工具和 Rust 库,用于从用户提供的测试用例生成正则表达式 本教程介绍 grex 命令的基本用法:根据输入生成正则表达式: 注意,grex 生成的正则表达式默认区分大小写、使用非捕获组使用 -i(不区分大小写),-g(捕获组)等区分匹配将字符转换为指定形式。这里使用 -d 参数将所有十进制数字转换为 \d。生成易读的正则表达式: 使用 --verbose 参数生成在多个缩进的更具可读性的表达式通过指定 --colorize 参数为生成的正则表达式提供语法突显对此有兴趣的用户,可以查看:x-cmd pkg for grexgrex - 命令行工具和 Rust 库,用于从用户提供的测试用例生成正则表达式生成字母 a-f 的正则表达式shx grex a b c d e f

将所有 Unicode 十进制数字转换为 \dshx grex -d "bc" "111"

将所有不是 Unicode 十进制数字的字符转换为 \Dshx grex -D bc "111"

将所有 Unicode 空格字符转换为 \sshx grex -cs "bc" "bc das"

将所有 Unicode 字符转换为 \wshx grex -cw "%c*" "bc das"

检测重复的非重叠子字符串并将其转换为量词表示法shx grex -cr "%2c*" "bbc DDdas"

在详细模式下生成外观更好的正则表达式,以及语法突显shx grex -cxr "bbc DDdas" "123"

相关链接包grex 上一篇sd下一篇 difft X-CMD AGPL 3.0 Licensed 导航1min 模块 包 主题 下载手册 命令手册 Awesome 关于联系我们 变更日志 资源GitHub Gitee GitCode © 2022-2024 李均豪(Li Junhao) 版权所有粤ICP备2021166893号-1