正则表达式交集检查器

interegular的Python项目详细描述


间歇

{emex}交叉点<$emex^>

一个库,用于检查python正则表达式的子集是否存在交集。 根据@qntm基于{a1}。改编为lark-parser

注意:由于使用了annotations/dataclasses,这个包not向后兼容python版本<;=3.5。因为这只是一小部分用户,所以我选择忽略这个“问题”。在

接口

FunctionUsage
^{}Takes a series of regexes as strings and returns a Generator of all intersections as ^{}
^{}Parses a regex as string to a ^{} object
^{}Takes a series of regexes as patterns and returns a Generator of all intersections as ^{}
^{}A class representing a parsed regex (intermediate representation)
^{}A enum representing the flags a regex can have
^{}A class representing a fully parsed regex. (Has many useful members)
^{}A function to change the flags that are applied to a regex
^{}A function to create a ^{} object from the Pattern
^{}A Class to compare a group of Patterns

支持什么?在

大多数普通的python regex语法都是支持的。但是由于使用了后端(最终状态机),有些东西无法实现。这包括:

  • 向后引用(\1(?P=open)
  • 条件匹配((?(1)a|b)
  • 一些lookaheads/lookbacks的例子(你必须尝试哪些工作,哪些没有)
    • 警告:这是目前没有正确处理,有些东西可能会解析,但不能正确工作。我现在正在做这个。在

有些事情根本没有实施,将来会实施:

  • 某些标志(进度:ims来自aiLmsux
  • 一些lookaheads/lookbacks的例子(你必须尝试哪些工作,哪些没有)

托多

  • 文件
  • 更多测试
  • 检查语法是否正确处理。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
记录打印JAVA控制台客户端的SOAP消息   java camunda异常找不到id为空的任务任务   java如何将json文件转换为以下格式{“Description”:“Cmd是一个开源工具”,数据{“别名”:“xCmd”,“软件”:“xCmd”,“_raw”:“}   java在Hibernate期间清理连接池花费的时间太长   用Java实现基本FTP客户端的socket   Java生成文本文件格式的格式化报告   java hibernate createQuery vs get   TriggerBuilder<Trigger>类型中带有Schedule(ScheduleBuilder<SBT>)的java不适用于参数(可变触发器)   JavaSwing:GlassPane防止鼠标指针更改   java使用for循环创建上下三角形   maven“Java Home”在cmd中运行“mvn v”时不显示   java客户端无法联机连接到服务器   java面向对象程序设计问题   java如何按升序和降序对hashmap数据进行排序   java为什么JPanel从不调用reapint