赞
踩
我想复制某段文字,但是那个网页我一点击复制,网页要求登录会员才能复制文字,但是我的程序里恰好没有根据图片提取文字的功能,于是我希望通过python的re库进行文字匹配
---->右键“查看网页源代码”--->快捷键【Ctrl+F】搜索“第一次考察培养情况”,将相关内容复制下来
---->jupyter notebook(.ipynb)运行代码如下:
- import re
- text2='<div class="reader-txt-layer" style="z-index:1"><div class="ie-fix"><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2476px;height: 190px;line-height: 190px;top: 1169px;left: 1429px;z-index: 0;" >第一次考察情况:党支部意见</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 1169px;left: 3905px;z-index: 1;font-family:simsun;;" > \
- </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 1417px;left: 1429px;z-index: 2;" >某某同志被批准为预备党员之后,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2476px;height: 190px;line-height: 190px;top: 1417px;left: 4248px;z-index: 3;" >能从各个方面严格要求自己,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1333px;height: 190px;line-height: 190px;top: 1417px;left: 6686px;z-index: 4;" >思想认识有了提</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3809px;height: 190px;line-height: 190px;top: 1665px;left: 1429px;z-index: 5;" >高。学习上态度端正,勤奋刻苦,目标明确。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 1665px;left: 5239px;z-index: 6;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2666px;height: 190px;line-height: 190px;top: 1665px;left: 5334px;z-index: 7;" >工作上认真负责,能够积极参加</p><p v-pre class="reader-word-layer reader-word-s1-4" style="width: 6591px;height: 190px;line-height: 190px;top: 1913px;left: 1429px;z-index: 8;" >各项活动,提高自身素质,促进自我全面发展。但是仍应注意提高办事效率。希</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 2160px;left: 1429px;z-index: 9;" >望继续努力,二季度有新的进步。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 2160px;left: 4287px;z-index: 10;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 203px;line-height: 203px;top: 2408px;left: 1429px;z-index: 11;font-family:simsun;;" > \
- </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 2655px;left: 1429px;z-index: 12;" >第二次考察情况:</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 2655px;left: 2953px;z-index: 13;font-family:simsun;;" > \
- </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1904px;height: 190px;line-height: 190px;top: 2903px;left: 1429px;z-index: 14;" >该同志政治立场坚定,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2095px;height: 190px;line-height: 190px;top: 2903px;left: 3309px;z-index: 15;" >在思想上积极要求进步,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1714px;height: 190px;line-height: 190px;top: 2903px;left: 5379px;z-index: 16;" >不断严格要求自己,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 2903px;left: 7069px;z-index: 17;" >加强党的十</p><p v-pre class="reader-word-layer reader-word-s1-4" style="width: 6591px;height: 190px;line-height: 190px;top: 3151px;left: 1429px;z-index: 18;" >七大精神的学习,按时上交思想汇报。在学习上认真刻苦,成绩优异,上学期获</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 190px;height: 190px;line-height: 190px;top: 3398px;left: 1429px;z-index: 19;" >得</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 3398px;left: 1619px;z-index: 20;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 3398px;left: 1714px;z-index: 21;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 3398px;left: 1809px;z-index: 22;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 3398px;left: 1905px;z-index: 23;" >等奖学金。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 3398px;left: 2832px;z-index: 24;" >工作上认真负责,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 3398px;left: 4332px;z-index: 25;" >任劳任怨,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 3398px;left: 5259px;z-index: 26;" >积极配合老师完成发展党员工作,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 3646px;left: 1429px;z-index: 27;" >能够做好与积极分子的联系工作。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3428px;height: 190px;line-height: 190px;top: 3646px;left: 4248px;z-index: 28;" >但也应注意到进一步加强与群众的联系,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 380px;height: 190px;line-height: 190px;top: 3646px;left: 7639px;z-index: 29;" >充分</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2285px;height: 190px;line-height: 190px;top: 3894px;left: 1429px;z-index: 30;" >发挥党员的先锋模范作用。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 3894px;left: 3715px;z-index: 31;font-family:simsun;;" > \
- </p><p v-pre class="reader-word-layer reader-word-s1-5" style="width: 41px;height: 180px;line-height: 180px;top: 4154px;left: 1429px;z-index: 32;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-5" style="width: 41px;height: 180px;line-height: 180px;top: 4154px;left: 1512px;z-index: 33;font-family:simsun;;" > \
- </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 4389px;left: 1429px;z-index: 34;" >第四次考察情况:</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 4389px;left: 2953px;z-index: 35;font-family:simsun;;" > \
- </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 761px;height: 190px;line-height: 190px;top: 4637px;left: 1429px;z-index: 36;" >经考察,</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 380px;height: 190px;line-height: 190px;top: 4637px;left: 2190px;z-index: 37;letter-spacing: -0.44999999999999996px;;" >XXX</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 5335px;height: 190px;line-height: 190px;top: 4637px;left: 2618px;z-index: 38;" >同志自入党以来,在学习上刻苦努力;在工作中认真负责;积极</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3428px;height: 190px;line-height: 190px;top: 4885px;left: 1429px;z-index: 39;" >向身边的同学宣传党的基本理论和路线、</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 4885px;left: 4833px;z-index: 40;" >方针政策,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2095px;height: 190px;line-height: 190px;top: 4885px;left: 5760px;z-index: 41;" >努力提高自身理论水平,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 190px;height: 190px;line-height: 190px;top: 4885px;left: 7831px;z-index: 42;" >但</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 6667px;height: 190px;line-height: 190px;top: 5132px;left: 1429px;z-index: 43;" >也存在着不足之处,比如做事有时不够细心等,希望今后能努力改正这些不足。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 5132px;left: 8023px;z-index: 44;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1333px;height: 190px;line-height: 190px;top: 5380px;left: 1429px;z-index: 45;" >经支委会讨论,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3809px;height: 190px;line-height: 190px;top: 5380px;left: 2724px;z-index: 46;" >认为该同志已基本符合一名正式党员的条件,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 5380px;left: 6496px;z-index: 47;" >同意提交支部大会</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 5628px;left: 1429px;z-index: 48;" >讨论其转正问题。</p><p v-pre class="reader-word-layer reader-word-s1-6" style="width: 95px;height: 190px;line-height: 190px;top: 5628px;left: 2953px;z-index: 49;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-6" style="width: 95px;height: 190px;line-height: 190px;top: 5875px;left: 1429px;z-index: 50;font-family:simsun;;" > \
- </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3428px;height: 190px;line-height: 190px;top: 6123px;left: 1429px;z-index: 51;" >该同志在成为积极分子的第一个季度中,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2095px;height: 190px;line-height: 190px;top: 6123px;left: 4819px;z-index: 52;" >加强了自身素质的培养,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1142px;height: 190px;line-height: 190px;top: 6123px;left: 6877px;z-index: 53;" >参加了许多的</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 6371px;left: 1429px;z-index: 54;" >院区活动,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3047px;height: 190px;line-height: 190px;top: 6371px;left: 2295px;z-index: 55;" >提高自己的组织能力和人际交往力,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 6371px;left: 5258px;z-index: 56;" >增强自身团队意识和集体荣誉感,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2285px;height: 190px;line-height: 190px;top: 6618px;left: 1429px;z-index: 57;" >同时也充实了自己的生活,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2285px;height: 190px;line-height: 190px;top: 6618px;left: 3690px;z-index: 58;" >提高了在群众中的影响力,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1714px;height: 190px;line-height: 190px;top: 6618px;left: 5951px;z-index: 59;" >群众基础明显增强,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 380px;height: 190px;line-height: 190px;top: 6618px;left: 7641px;z-index: 60;" >带头</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1142px;height: 190px;line-height: 190px;top: 6866px;left: 1429px;z-index: 61;" >作用较突出。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3238px;height: 190px;line-height: 190px;top: 6866px;left: 2486px;z-index: 62;" >提升了自己的团队意识和集体荣誉感,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2476px;height: 190px;line-height: 190px;top: 6866px;left: 5639px;z-index: 63;" >团队合作力和人际交往能力。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 7114px;left: 1429px;z-index: 64;" >生活中乐于助人,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 7114px;left: 2911px;z-index: 65;" >乐观开朗。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 7114px;left: 3821px;z-index: 66;" >为人谦和,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2474px;height: 190px;line-height: 190px;top: 7114px;left: 4732px;z-index: 67;letter-spacing: -0.15px;;" >思考问题是一切从实际出发,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 7114px;left: 7164px;z-index: 68;" >实事求是,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1714px;height: 190px;line-height: 190px;top: 7361px;left: 1429px;z-index: 69;" >很好的完成了生活、</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1904px;height: 190px;line-height: 190px;top: 7361px;left: 3118px;z-index: 70;" >学习和工作上的事情。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2285px;height: 190px;line-height: 190px;top: 7361px;left: 4998px;z-index: 71;" >该同志除参加党校学习外,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 761px;height: 190px;line-height: 190px;top: 7361px;left: 7260px;z-index: 72;" >自己还主</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1904px;height: 190px;line-height: 190px;top: 7609px;left: 1429px;z-index: 73;" >动学习党的相关知识,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1714px;height: 190px;line-height: 190px;top: 7609px;left: 3309px;z-index: 74;" >理论水平有所提高。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2476px;height: 190px;line-height: 190px;top: 7609px;left: 4998px;z-index: 75;" >在政治上保持了清醒的头脑,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 571px;height: 190px;line-height: 190px;top: 7609px;left: 7450px;z-index: 76;" >在思想</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 7857px;left: 1429px;z-index: 77;" >上坚持与时俱进,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3238px;height: 190px;line-height: 190px;top: 7857px;left: 2928px;z-index: 78;" >不断提高自己的理论水平和思想觉悟。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 571px;height: 190px;line-height: 190px;top: 7857px;left: 6142px;z-index: 79;" >同时,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1333px;height: 190px;line-height: 190px;top: 7857px;left: 6689px;z-index: 80;" >该同志时时关注</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 6667px;height: 190px;line-height: 190px;top: 8104px;left: 1429px;z-index: 81;" >国家大事,增强自身使命感和荣辱观念,及时向党组织汇报思想、工作及学习。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 571px;height: 190px;line-height: 190px;top: 8352px;left: 1429px;z-index: 82;" >但是,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2666px;height: 190px;line-height: 190px;top: 8352px;left: 1975px;z-index: 83;" >在思考问题的角度还不够深刻,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3047px;height: 190px;line-height: 190px;top: 8352px;left: 4617px;z-index: 84;" >希望今后能够多涉及各方面的知识,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 380px;height: 190px;line-height: 190px;top: 8352px;left: 7641px;z-index: 85;" >丰富</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 4571px;height: 190px;line-height: 190px;top: 8600px;left: 1429px;z-index: 86;" >眼界,同时对自己的工作和学习制定一个完整的计划。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 8600px;left: 6002px;z-index: 87;font-family:simsun;;" > \
- </p><p v-pre class="reader-word-layer reader-word-s1-5" style="width: 41px;height: 180px;line-height: 180px;top: 8859px;left: 1429px;z-index: 88;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-5" style="width: 41px;height: 180px;line-height: 180px;top: 9107px;left: 1429px;z-index: 89;font-family:simsun;;" > '
- text2 = re.sub('\<.*?\>', "", text2)
- # text2 = re.sub(' ', "", text2)
- text2 = re.sub(' ', "\n", text2)
- text2 = re.sub(' ', "\n", text2)
- print(text2)
:半角的不断行的空白格(推荐使用),即键盘上的space键
&ensp:半角的空格,占据的宽度正好是1/2个中文宽度
采用的re.sub()方法,即替换字符串
补充一点:在jupyter中,如果赋予变量的字符串太长,在jupyter自动换行,在每一行后面添加“\”,即可赋值为一个字符串,即一个变量,注意区别单双引号的分别使用。同样的代码放在pycharm中运行,则一定要添加 # -*- coding:utf-8 -*-
否则将出现debug error:
SyntaxError: Non-UTF-8 code starting with '\xe7' in file xxx.py on line xx, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
error翻译:
语法错误:在xxx.py文件的xx行中,以'\xe7'开头的非utf -8代码,但没有声明编码; 详情请参见http://python.org/dev/peps/pep-0263/
在pycharm中最开始添加:# -*- coding:utf-8 -*-
# -*- coding:utf-8 -*-
- # -*- coding:utf-8 -*-
- import re
- text2='<div class="reader-txt-layer" style="z-index:1"><div class="ie-fix"><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2476px;height: 190px;line-height: 190px;top: 1169px;left: 1429px;z-index: 0;" >第一次考察情况:党支部意见</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 1169px;left: 3905px;z-index: 1;font-family:simsun;;" > '\
- '</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 1417px;left: 1429px;z-index: 2;" >某某同志被批准为预备党员之后,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2476px;height: 190px;line-height: 190px;top: 1417px;left: 4248px;z-index: 3;" >能从各个方面严格要求自己,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1333px;height: 190px;line-height: 190px;top: 1417px;left: 6686px;z-index: 4;" >思想认识有了提</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3809px;height: 190px;line-height: 190px;top: 1665px;left: 1429px;z-index: 5;" >高。学习上态度端正,勤奋刻苦,目标明确。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 1665px;left: 5239px;z-index: 6;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2666px;height: 190px;line-height: 190px;top: 1665px;left: 5334px;z-index: 7;" >工作上认真负责,能够积极参加</p><p v-pre class="reader-word-layer reader-word-s1-4" style="width: 6591px;height: 190px;line-height: 190px;top: 1913px;left: 1429px;z-index: 8;" >各项活动,提高自身素质,促进自我全面发展。但是仍应注意提高办事效率。希</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 2160px;left: 1429px;z-index: 9;" >望继续努力,二季度有新的进步。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 2160px;left: 4287px;z-index: 10;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 203px;line-height: 203px;top: 2408px;left: 1429px;z-index: 11;font-family:simsun;;" > '\
- '</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 2655px;left: 1429px;z-index: 12;" >第二次考察情况:</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 2655px;left: 2953px;z-index: 13;font-family:simsun;;" > '\
- '</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1904px;height: 190px;line-height: 190px;top: 2903px;left: 1429px;z-index: 14;" >该同志政治立场坚定,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2095px;height: 190px;line-height: 190px;top: 2903px;left: 3309px;z-index: 15;" >在思想上积极要求进步,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1714px;height: 190px;line-height: 190px;top: 2903px;left: 5379px;z-index: 16;" >不断严格要求自己,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 2903px;left: 7069px;z-index: 17;" >加强党的十</p><p v-pre class="reader-word-layer reader-word-s1-4" style="width: 6591px;height: 190px;line-height: 190px;top: 3151px;left: 1429px;z-index: 18;" >七大精神的学习,按时上交思想汇报。在学习上认真刻苦,成绩优异,上学期获</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 190px;height: 190px;line-height: 190px;top: 3398px;left: 1429px;z-index: 19;" >得</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 3398px;left: 1619px;z-index: 20;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 3398px;left: 1714px;z-index: 21;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 3398px;left: 1809px;z-index: 22;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 3398px;left: 1905px;z-index: 23;" >等奖学金。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 3398px;left: 2832px;z-index: 24;" >工作上认真负责,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 3398px;left: 4332px;z-index: 25;" >任劳任怨,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 3398px;left: 5259px;z-index: 26;" >积极配合老师完成发展党员工作,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 3646px;left: 1429px;z-index: 27;" >能够做好与积极分子的联系工作。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3428px;height: 190px;line-height: 190px;top: 3646px;left: 4248px;z-index: 28;" >但也应注意到进一步加强与群众的联系,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 380px;height: 190px;line-height: 190px;top: 3646px;left: 7639px;z-index: 29;" >充分</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2285px;height: 190px;line-height: 190px;top: 3894px;left: 1429px;z-index: 30;" >发挥党员的先锋模范作用。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 3894px;left: 3715px;z-index: 31;font-family:simsun;;" > '\
- '</p><p v-pre class="reader-word-layer reader-word-s1-5" style="width: 41px;height: 180px;line-height: 180px;top: 4154px;left: 1429px;z-index: 32;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-5" style="width: 41px;height: 180px;line-height: 180px;top: 4154px;left: 1512px;z-index: 33;font-family:simsun;;" > '\
- '</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 4389px;left: 1429px;z-index: 34;" >第四次考察情况:</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 4389px;left: 2953px;z-index: 35;font-family:simsun;;" > '\
- '</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 761px;height: 190px;line-height: 190px;top: 4637px;left: 1429px;z-index: 36;" >经考察,</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 380px;height: 190px;line-height: 190px;top: 4637px;left: 2190px;z-index: 37;letter-spacing: -0.44999999999999996px;;" >XXX</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 5335px;height: 190px;line-height: 190px;top: 4637px;left: 2618px;z-index: 38;" >同志自入党以来,在学习上刻苦努力;在工作中认真负责;积极</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3428px;height: 190px;line-height: 190px;top: 4885px;left: 1429px;z-index: 39;" >向身边的同学宣传党的基本理论和路线、</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 4885px;left: 4833px;z-index: 40;" >方针政策,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2095px;height: 190px;line-height: 190px;top: 4885px;left: 5760px;z-index: 41;" >努力提高自身理论水平,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 190px;height: 190px;line-height: 190px;top: 4885px;left: 7831px;z-index: 42;" >但</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 6667px;height: 190px;line-height: 190px;top: 5132px;left: 1429px;z-index: 43;" >也存在着不足之处,比如做事有时不够细心等,希望今后能努力改正这些不足。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 5132px;left: 8023px;z-index: 44;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1333px;height: 190px;line-height: 190px;top: 5380px;left: 1429px;z-index: 45;" >经支委会讨论,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3809px;height: 190px;line-height: 190px;top: 5380px;left: 2724px;z-index: 46;" >认为该同志已基本符合一名正式党员的条件,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 5380px;left: 6496px;z-index: 47;" >同意提交支部大会</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 5628px;left: 1429px;z-index: 48;" >讨论其转正问题。</p><p v-pre class="reader-word-layer reader-word-s1-6" style="width: 95px;height: 190px;line-height: 190px;top: 5628px;left: 2953px;z-index: 49;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-6" style="width: 95px;height: 190px;line-height: 190px;top: 5875px;left: 1429px;z-index: 50;font-family:simsun;;" > '\
- '</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3428px;height: 190px;line-height: 190px;top: 6123px;left: 1429px;z-index: 51;" >该同志在成为积极分子的第一个季度中,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2095px;height: 190px;line-height: 190px;top: 6123px;left: 4819px;z-index: 52;" >加强了自身素质的培养,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1142px;height: 190px;line-height: 190px;top: 6123px;left: 6877px;z-index: 53;" >参加了许多的</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 6371px;left: 1429px;z-index: 54;" >院区活动,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3047px;height: 190px;line-height: 190px;top: 6371px;left: 2295px;z-index: 55;" >提高自己的组织能力和人际交往力,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2857px;height: 190px;line-height: 190px;top: 6371px;left: 5258px;z-index: 56;" >增强自身团队意识和集体荣誉感,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2285px;height: 190px;line-height: 190px;top: 6618px;left: 1429px;z-index: 57;" >同时也充实了自己的生活,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2285px;height: 190px;line-height: 190px;top: 6618px;left: 3690px;z-index: 58;" >提高了在群众中的影响力,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1714px;height: 190px;line-height: 190px;top: 6618px;left: 5951px;z-index: 59;" >群众基础明显增强,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 380px;height: 190px;line-height: 190px;top: 6618px;left: 7641px;z-index: 60;" >带头</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1142px;height: 190px;line-height: 190px;top: 6866px;left: 1429px;z-index: 61;" >作用较突出。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3238px;height: 190px;line-height: 190px;top: 6866px;left: 2486px;z-index: 62;" >提升了自己的团队意识和集体荣誉感,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2476px;height: 190px;line-height: 190px;top: 6866px;left: 5639px;z-index: 63;" >团队合作力和人际交往能力。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 7114px;left: 1429px;z-index: 64;" >生活中乐于助人,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 7114px;left: 2911px;z-index: 65;" >乐观开朗。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 7114px;left: 3821px;z-index: 66;" >为人谦和,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2474px;height: 190px;line-height: 190px;top: 7114px;left: 4732px;z-index: 67;letter-spacing: -0.15px;;" >思考问题是一切从实际出发,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 952px;height: 190px;line-height: 190px;top: 7114px;left: 7164px;z-index: 68;" >实事求是,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1714px;height: 190px;line-height: 190px;top: 7361px;left: 1429px;z-index: 69;" >很好的完成了生活、</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1904px;height: 190px;line-height: 190px;top: 7361px;left: 3118px;z-index: 70;" >学习和工作上的事情。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2285px;height: 190px;line-height: 190px;top: 7361px;left: 4998px;z-index: 71;" >该同志除参加党校学习外,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 761px;height: 190px;line-height: 190px;top: 7361px;left: 7260px;z-index: 72;" >自己还主</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1904px;height: 190px;line-height: 190px;top: 7609px;left: 1429px;z-index: 73;" >动学习党的相关知识,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1714px;height: 190px;line-height: 190px;top: 7609px;left: 3309px;z-index: 74;" >理论水平有所提高。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2476px;height: 190px;line-height: 190px;top: 7609px;left: 4998px;z-index: 75;" >在政治上保持了清醒的头脑,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 571px;height: 190px;line-height: 190px;top: 7609px;left: 7450px;z-index: 76;" >在思想</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1523px;height: 190px;line-height: 190px;top: 7857px;left: 1429px;z-index: 77;" >上坚持与时俱进,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3238px;height: 190px;line-height: 190px;top: 7857px;left: 2928px;z-index: 78;" >不断提高自己的理论水平和思想觉悟。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 571px;height: 190px;line-height: 190px;top: 7857px;left: 6142px;z-index: 79;" >同时,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 1333px;height: 190px;line-height: 190px;top: 7857px;left: 6689px;z-index: 80;" >该同志时时关注</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 6667px;height: 190px;line-height: 190px;top: 8104px;left: 1429px;z-index: 81;" >国家大事,增强自身使命感和荣辱观念,及时向党组织汇报思想、工作及学习。</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 571px;height: 190px;line-height: 190px;top: 8352px;left: 1429px;z-index: 82;" >但是,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 2666px;height: 190px;line-height: 190px;top: 8352px;left: 1975px;z-index: 83;" >在思考问题的角度还不够深刻,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 3047px;height: 190px;line-height: 190px;top: 8352px;left: 4617px;z-index: 84;" >希望今后能够多涉及各方面的知识,</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 380px;height: 190px;line-height: 190px;top: 8352px;left: 7641px;z-index: 85;" >丰富</p><p v-pre class="reader-word-layer reader-word-s1-1" style="width: 4571px;height: 190px;line-height: 190px;top: 8600px;left: 1429px;z-index: 86;" >眼界,同时对自己的工作和学习制定一个完整的计划。</p><p v-pre class="reader-word-layer reader-word-s1-3" style="width: 52px;height: 190px;line-height: 190px;top: 8600px;left: 6002px;z-index: 87;font-family:simsun;;" > '\
- '</p><p v-pre class="reader-word-layer reader-word-s1-5" style="width: 41px;height: 180px;line-height: 180px;top: 8859px;left: 1429px;z-index: 88;font-family:simsun;;" > </p><p v-pre class="reader-word-layer reader-word-s1-5" style="width: 41px;height: 180px;line-height: 180px;top: 9107px;left: 1429px;z-index: 89;font-family:simsun;;" > '
-
- text2 = re.sub('\<.*?\>', "", text2)
- # text2 = re.sub(' ', "", text2)
- text2 = re.sub(' ', "\n", text2)
- text2 = re.sub(' ', "\n", text2)
- print(text2)
其中text变量也可以是以下这种表达格式:
- text1 =f'nihaoma'\
- f'nilaizinali'\
- f'nihao'\
- 'nihao'\
- f'nihao'
(1)在jupyter notebook中运行成功,在pycharm中运行报错:
(4)pycharm输入的字符串太长如何表达
目前是代码小白一名,如有更厉害的编程小伙伴,可相互探讨,希望他人有更好的代码和方法(由于本人编程思维基础较弱,只能是代码的搬运工)!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。