Advertisement

开发一个带有GUI的Python正则表达式匹配工具

阅读量:

程序源代码如下

具体的正则表达式可能存在一定的误差,当匹配未能成功时,可根据实际情况对其进行相应的调整!

复制代码
    # encoding:utf8
    """
    __author__ : weilinlin
    __file__   : RegexTool
    __time__   : 2020-12-16
    """
    from tkinter import *
    from tkinter import messagebox, ttk
    import re
    
    root = Tk()
    root.title("RegexTool")
    root.resizable(0, 0)
    
    
    def init():
    """
    构造GUI初始化页面
    TODO: 长度最大匹配长度判断逻辑尚未补充
    TODO: 常用正则表达式列表
    :return:
    """
    button00 = Button(root, width=12, text="( )", command=lambda: text1.insert('insert', "()"))
    button01 = Button(root, width=12, text="[ ]", 

全部评论 (0)

还没有任何评论哟~