textpad

Regular expression to search multiple strings (Textpad)

回眸只為那壹抹淺笑 提交于 2019-11-28 20:08:05
I'm a bit new to regex and am looking to search for multiple lines/instaces of some wildcard strings such as *8768, *9875, *2353. I would like to pull all instances of these (within one file) rather than searching them individually. Any help is greatly appreciated. I've tried things such as *8768,*9875 etc... If I understand what you are asking, it is a regular expression like this: ^(8768|9875|2353) This matches the three sets of digit strings at beginning of line only. To get the lines that contain the texts 8768 , 9875 or 2353 , use: ^.*(8768|9875|2353).*$ What it means: ^ from the

Python编写一个记事本

若如初见. 提交于 2019-11-26 20:04:38
这是一个简单的记事本,使用Python编写。 在网上也有很多的相关代码,发现不是这里有问题,就是那里有问题,要么就是功能太简单。 这个是我参考网上相关代码,增删debug后的一个可用版本,仅供参考。 下面是一个效果图 下面是源代码 1 # -*- coding: utf-8 -*- 2 # @Time : 2019/5/1 3 # @Author : water66 4 # @Site : 5 # @File : notepad.py 6 # @Version : 1.0 7 # @Python Version : 3.6 8 # @Software: PyCharm 9 10 11 from tkinter import * 12 from tkinter.filedialog import * 13 from tkinter.messagebox import * 14 from tkinter import scrolledtext 15 import os 16 17 filename='' 18 19 20 def author(): 21 showinfo(title="作者", message="water66") 22 23 24 def power(): 25 showinfo(title="版权信息", message="water66") 26 27 28