gfdgdfg

时间:2024-07-18 05:20:55编辑:奇事君

正则表达式

一、基本语法

    1.    \d  任意数字

            \w  任意字母数字下划线

            \s    空格,制表符,换行符等字符

            .      除了换行符任意一个字符




    2.    [ab5@] 表示匹配里面的任意一个字符

            [^a]除a外的任意一个字符

            [f-k]匹配f到k的任意一个字符

        补充:特殊符号被包含在中括号中失去意义,只代表符号本身,^-除外;

        标准字符集合除小数点外被包含在中括号中,自定义字符集包含该集合。

        如[\d.-+]  匹配:数字小数点+-。

二、量词

             \d{6}  匹配6个数字

             {n,m}最少重复n次最多m次

            默认贪婪模式即匹配的越多越好,加?非贪婪模式

            \d{6}?

            \d{6,}最少6次

            ?匹配0次或1次,相当于{0,1}

            +  表达式至少出现一次,相当于{1,}

            *  出现任意次,相当于{0,}

三、字符边界,零宽度

            ^表示字符开始的位置

            ^i    匹配字符串开头第一个字符位置

            $  字符串结束的位置

            \b    不全是\w

            \A\Z分别表示文本开头和结尾

四、分支结构、捕获组、非捕获组

            分支结构      |        或

            捕获组      ()  捕获所匹配的字符,后面跟/1、/2来取匹配的字符

            非捕获组(?:)不捕获括号内匹配的字符,有利于减小内存开支。

五、零宽断言

          (?=表达式)  表示后面匹配的表达式,但不包括匹配的字符串

          (?<=表达式)  断言自身前面出现的表达式

          (?!表达式)自身后面不能出现的表达式

          (?<!表达式)断言此位置前面不能匹配的表达式


[create_time]2022-07-25 00:14:45[/create_time]2022-08-04 07:15:41[finished_time]1[reply_count]0[alue_good]舒适还明净的海鸥i[uname]https://himg.bdimg.com/sys/portrait/item/wise.1.47c7c989.PNHyyviQpkbkWYf_U9mbzQ.jpg?time=670&tieba_portrait_time=670[avatar]TA获得超过1.3万个赞[slogan]这个人很懒,什么都没留下![intro]8[view_count]

正则表达式

正则表达式(Regular Expression) 正则表达式是一种字符特征的描述方式,用来在文本中匹配到用户想要的东西. 正则表达式与通配符: 1.正则表达式一般用于处理文本内容,常用命令有grep,sed,awk,vim等 通配符一般用于匹配文件名,常用命令有find,ls,cp等 2.各符号的含义不尽相同. 什么地方使用正则表达式 vim grep sed awk nginx apache mail垃圾邮件过滤。。。 perl java python 等等都使用正则 构成 1.元字符(基本元字符、扩展元字符) 2.除元字符之外的任意字符都是表示他字面意思的正则表达式 正则表达式的匹配过程 正则表达式是按照从表达式最左端第一个字符开始,左到右依次一个一个字符进行匹配.当字符串中有字符成功匹配到正则表达式中字符,则从这个位置开始尝试正则表达式中的下一个字符进行匹配,如果匹配成功则继续从这个位置开始匹配正则表达式中下一个字符;如果匹配不成功,则“回溯”到第一次匹配的字符处重新从正则表达式中第一个字符开始匹配。 特征 贪婪匹配 基本元字符 1.字符匹配 ** . 任意单个字符** ** [] []内的任意单个字符** ** [ a-z] 任意单个小写字母** ** [a-zA-z] [0-9] [a-zA-z0-9]** [^0-9]除了数字外的任意当个字符 [a-z]小写字母 [0-9]数字 [A-Z]大写字母 [a-zA-Z]所有字母 [^a-zA-Z0-9]所有符号 次数匹配 ** * 匹配前面的字符重复****0次****到多次 * {****n****}****匹配前面的字符重复任意次数 {n,m}前面的字符重复n次到m次 {,n} 前面的字符最多重复n次 {n,} 前面的字符最少重复n次 ** 位置匹配** ^ 行首 $ 行尾 < 词首 > 词尾 扩展元字符****Extended Metacharacters (egrep and awk) sed -r ?? 前面的字符重复0次或1次 {} 次数匹配意义同基本元素中的{} |或着 () 分组 \数字 引用分组的内容 前向: 在正则中引用 后向: 在其他地方引用, \0表示引用模式中所有的内容 \0 ⇔ & hehello llllo llheo hellhello hellohello 编写正则表达式的3 个步骤****: 1 知道要匹配的内容以及它如何出现在文本中。 2 编写一个模式来描述要匹配的内容 3 测试模式来查看它匹配的内容,不能错,不能漏,不能多 练习: head /etc/passwd > /tmp/pass 1. 删除每行的第一个字符 2. 在每行行首插入hello 3. 删除每行的第二个字符 4. 把每个数字用()括起来 如:(1)(2) 5. 把每个数值用()括起来 如:(12) 6. 删除每行的倒数第二个字符 7. 交换每行的第一个和最后一个字符 8. 删除刚好三个字符的单词 9. 把ro或da替换成A 思考: 1. 删除每行的第一个单词(纯字母) 2. 交换第一个和倒数第二个单词(纯字母) POSIX字符类 点击这里点击这里 [:digit:]任何数字 [:xdigit:]任何十六进制数字 [:alpha:]任何字母 [:lower:]任何小写字母 [:upper:]任何大写字母 [:alnum:]任何字母或数字 [:cntrl:]ASCII控制字符(ASCII 0~31 和 ASCII 127) [:punct:]不属于[:alnum:]和[:cntrl:]的任何字符 [:blank:]空格或制表符([\t ]) [:space:]任何空白字符,包括空格([\f\n\r\t\v ]) [:print:]任何可打印字符 [:graph:]同[:print:],但不包括空格

[create_time]2022-07-28 19:11:27[/create_time]2022-08-06 04:55:12[finished_time]1[reply_count]0[alue_good]机器1718[uname]https://himg.bdimg.com/sys/portrait/item/wise.1.6a939a71.4689PU8u9VKV47veLOB_JA.jpg?time=738&tieba_portrait_time=738[avatar]TA获得超过5656个赞[slogan]这个人很懒,什么都没留下![intro]245[view_count]

,mfdxgdfgdfg

建议你拖着,这种合约有诉讼时效,是2年,就是两年之后法院不予受理。 从他去你家要损失费那天算起。
这是婚姻法司法解释2
第十条 当事人请求返还按照习俗给付的彩礼的,如果查明属于以下情形,人民法院应当予以支持:

  (一)双方未办理结婚登记手续的;

  (二)双方办理结婚登记手续但确未共同生活的;

  (三)婚前给付并导致给付人生活困难的。


你们本来就应该退还彩礼钱,
但是其这个合约的损失费有点高,几乎跟彩礼一样了,就算去法院,法院也不会全部受理。因为不合理。你们签订的合约有效,但是法院不会全部支持。


[create_time]2012-03-23 21:07:09[/create_time]2012-04-07 14:05:38[finished_time]2[reply_count]0[alue_good]巧克力商店[uname]https://himg.bdimg.com/sys/portrait/item/wise.1.5ed4a49.ahnaDDTUy5CNvrWkuOCdUA.jpg?time=3201&tieba_portrait_time=3201[avatar]TA获得超过462个赞[slogan]等待和希望[intro]58[view_count]

中心小学六年级有三个班,每班人数都相等,已知一班的男生人数等于二班的女生人数,三班的男生占全年级男

解:设每个班的人数为x人,则全年级总人数为3x人,       因为一班男生人数等于二班女生人数,所以一班和二班男生人数之和等于一班和二班女生人数之和,为x人,       三班男生人数占全年级男生人数的 3/7,所以一班和二班男生占全年级男生人数的1- 3/7= 4/7,       所以全年级男生人数为x÷ 4/7= 7/4x(人),所以全年级女生人数为3x- 7/4x= 5/4x(人),       所以所有女生人数占全年级总人数的 5/4x÷3x= 5/12,       答:所有女生人数占全年级总人数的 5/12.故答案为:所有女生人数占全年级总人数的 5/12.


[create_time]2015-05-22 19:28:24[/create_time]2015-05-22 19:58:25[finished_time]5[reply_count]5[alue_good]匿名用户[uname]https://iknow-base.cdn.bcebos.com/yt/bdsp/icon/anonymous.png?x-bce-process=image/quality,q_80[avatar][slogan]这个人很懒,什么都没留下![intro]3746[view_count]

一首节奏感很强的韩文歌男生唱的

1、Booty Music - Deepside


2、Fallin Out - Keyshia Cole


3、Just Dance - Lady GaGa


4、Volar - 侧田


5、Lupin - Kara


6、Let's Go - Trick Daddy


7、Roc - Nadiya


8、Grew Up A Screw Up - Ludacris


9、Jigga What-Faint - Linkin Park


10、Points Of Authority - Linkin Park


11、Tik Tok - Ke$ha


12、Too Legit To Quit - MC Hammmer


13、Deja Vu - Beyonce Knowles


14、Like a G6 - Far East Movement


15、Incognito - Brooke


16、Buttons - The Pussycat Dolls


17、Circus - Britney Spears


18、DarkOscillators - Stereophobia


19、Money - 迈克尔·杰克逊


20、Superman - 倪子冈


[create_time]2015-02-12 11:06:43[/create_time]2015-02-27 11:03:02[finished_time]1[reply_count]3[alue_good]wojtn913[uname]https://himg.bdimg.com/sys/portrait/item/wise.1.7fb16ce9.lN5KiwUiD5PglWRneG280g.jpg?time=5238&tieba_portrait_time=5238[avatar]TA获得超过964个赞[slogan]这个人很懒,什么都没留下![intro]2202[view_count]

请帮忙翻译为英文, 谢谢!

1. In order to plete the leader duty, therefore, studies
anization behavior, makes me further to understand the leader needs
the condition, but appropriately applies in the work. 2. good
personnel management, certainly want the pany, the boss and the
colleague three ects joint effort to achieved. 3. The good
personnel management, certainly wants the pany, the boss and the
colleague three ects joint effort to achieved. The pany must
have the fair fair public personnel management system, repenses
(wages, welfare and promotion) punishes (good discipline system)
fairly to want to be legitimate. 4. must be a good leader, pletes
approaches the type (bosses all often to be late, you select may warn
subordinate is late), most important is concerneds with the matter and
not the individual, carries out the personnel management according to
the pany system, who according to wrong judges event by the fact
and the principle (to be wrong to who may be person, but also but
pany system). 5.1 good leaders most are important are humanist The
subordinate is only your work partner, works the person for you, is
not your slave, every beforehand thought from theirs standpoint, they
only then can feel a heartfelt admiration work for you, detain
loyally, has the ownership feeling staff If you only are work as they
are a machine, pays out the wages to calculate, then casually catches
people on the street all to be allowed to be boss Everything all
needs to use them pletely only then to settle falls, you only can
unceasing drain the staff 6. The colleague works also must mutually
take care of, mutually respects, because above speaks everybody to
work together as colleagues for 8-10 hour, the relations at least is
every day the mon friend, in the work can be happy.,1. to plete the leader duty, therefore, studies anization behavior, makes my to further understand that the leader needs the condition, but applies appropriately in the work.
2. The good personnel management, wants certainly the pany, the boss and the colleague three ects joint effort to achieve. the
3. good personnel management, wants certainly the pany, the boss and the colleague three ects joint effort to achieve. The pany must have the fair fair public personnel management system, repenses (wages, welfare and promotion) punishes (good discipline system) to want fairly legitimate.
4. Must be a good leader, pletes approaches the type (bosses often to be late, you select may warn that subordinate is late), most important is concerned with the matter and not the individual, carries out the personnel management according to the pany system, who according to judges event by the fact and the principle to who wrong (wrong to be possible to be human, but also pany system).
5. A good leader most is important is humanist. The subordinate is only your work partner, works the human for you, is not your slave, everything thought first from theirs standpoint, they only will then feel a heartfelt admiration work for you, detain loyally, will have the sense of belonging staff. If you are only when they are a machine, has paid out the wages, then catches people on the street to be possible casually to be boss. Everything needs to use them pletely only then to settle falls, you only unceasing outflow staff.
6. the colleague works must take care of mutually, respects mutually, because above speaks everybody to work together as colleagues for 8-10 hours, the relations are at least every day the mon friend, in the work can be happy.,


[create_time]2022-10-08 01:52:01[/create_time]2022-10-17 11:48:44[finished_time]1[reply_count]0[alue_good]慧圆教育[uname]https://himg.bdimg.com/sys/portrait/item/wise.1.f71b4cad.Rgw38a9dxBAbEi7qW4srDA.jpg?time=4738&tieba_portrait_time=4738[avatar]TA获得超过4094个赞[slogan]这个人很懒,什么都没留下![intro]4[view_count]

帮忙翻译成英文,谢谢

Long time no see.
How are you?I took a round in your QQzone today, and now i have some words to talk to you.I decide not to type in Chinese ,and i think English is better.I have heard that you are falling in love,and i feel happy for you.At the same time,i feel delighted that i have grew old suddenly within these several seperated months,i donnot know if you have the same feeling with me?
After all,i found that time is the best medicine.Do you know?i will not hate you even if we can't be together,bacause tolerant is full with my heart.Only i wish everyone had a hapy life.You must want to know how about my life,dosennot it?OK,let me tell you,i have a good life,everything goes well,and will you ask if i have a BF?i just want to say that he will be the people who marry me when i have a BF.And i believe that he will be very fine to me.God wil be fair to everyone.
let me say some blessed words,Although it is some simple blessed words,i wish you happiness from my heart.
New Year is coming,wish you happy forever!i think i will not come to see you if there is no particular thing,because we have our own life,let's put those nice memory into our heart deeply .
Merry Christmas!
姑娘,翻译完了,另外,希望你,关于旧爱能早日云淡风轻,有些人,错过了就是错过了,也没必要感伤,总有个人在前方等着你,愿意用一辈子守候你,祝你幸福


[create_time]2010-12-17 14:32:42[/create_time]2012-06-21 19:27:09[finished_time]6[reply_count]1[alue_good]思旭纷飞[uname]https://himg.bdimg.com/sys/portrait/item/wise.1.f350f382.X9klcZb_jFzujXVIIdy7Ow.jpg?time=3136&tieba_portrait_time=3136[avatar]TA获得超过1.2万个赞[slogan]这个人很懒,什么都没留下![intro]2262[view_count]

火云传奇电影中的插曲叫什么名字

是李玖哲翻唱的Making love out nothing at all(让爱一切成空) I know just how to whisper 我明白如何轻声细语 And I know just how to cry 也明白如何哭喊 I know just where to find the answers 我知道哪里可以找到答案 And I know just how


[create_time]2016-04-07 20:43:23[/create_time]2016-04-20 15:00:43[finished_time]1[reply_count]1[alue_good]yzxbjdx1[uname]https://himg.bdimg.com/sys/portrait/item/wise.1.cf999037.LMiLKZr5lF2rAp8D6TPOMQ.jpg?time=3088&tieba_portrait_time=3088[avatar]TA获得超过3418个赞[slogan]这个人很懒,什么都没留下![intro]1308[view_count]

画蛇添足的意思是什么? 寓意是什么?

画蛇添足:
画蛇时给蛇添上脚.比喻做了多余的事,非但无益,反而不合适.也比喻虚构事实,无中生有.
画蛇添足 (发音 huà shé tiān zú)
【解 释】 画蛇时给蛇添上脚.比喻做了多余的事,反而有害无益,徒劳无功.
【出 处】 西汉·刘向《战国策·齐策二》:“蛇固无足,子安能为之足?”
【用 法】 连动式;作宾语;含贬义
【示 例】 周而复《上海的早晨》第四部:“他想接上去说,又觉得是~,只好惋惜地坐着没动.”
【近义词】 徒劳无功、多此一举
【反义词】 画龙点睛、恰到好处、恰如其分
【灯 谜】 巳
【典 故】
故事发生在古代楚国.有一家人家祭祀祖宗.仪式完毕后,把剩下的一壶酒,赏给手下的办事人员喝.人多酒少,很难分配.这几个人就商量分酒的办法.有个人说:“一壶酒分给几个人喝,太少了.要喝就喝个痛快.给一个人喝才过瘾呢!”大家都这样想,可是谁也不肯放弃这个权利.另一个提议说:“这样吧,让我们来个画蛇比赛.每个人在地上画一条蛇,谁先画完,谁就喝这壶酒.”大伙儿都赞成这个办法.于是每个人折了一根树枝,同时开始画起来.有一个人画得最快,转眼之间,把蛇画好了.他左手抓过酒壶,得意地看看同伴,心想,他们要赶上我还差得远哩.便洋洋自得地说:“我再给蛇添上几只脚,也能比你们先画完.”正当他画第二只脚的时候,另一个人把蛇画完了.他一把夺过酒壶说:“蛇本来是没有脚的,你画的根本就不是蛇.还是我先画完,酒应当归我喝.” 添画蛇脚的人无话可说,只好咽着唾沫,看别人喝酒.
[提示]
画蛇,就要象一条蛇;添上脚,就成了“四不象”.做任何事情都要实事求是,不卖弄聪明,不节外生技.否则,非但不能把事情做好,反而会把事情办糟.
[原文]
楚有祠者①,踢其舍人卮酒②.舍人相谓曰③:“数人饮之不足,一人饮之有余,请画地为蛇,先成者饮酒.”一人蛇先成,引酒且饮之④;乃左手持卮,右手画蛇曰:“吾能为之足.”未成.一人之蛇成,夺其卮曰:“蛇固无足⑤,子安能为之足⑥?”遂饮其
酒⑦.为蛇足者,终亡其酒⑧.——《战国策》
[注释]
①祠(cí)——春祭.
②舍人——古代王公贵族手下的办事人员.卮(zhī)—— 古代盛酒的器具.
③相谓——互相商量.
④引酒——拿过酒杯.引,取过来.且——将要.
⑤固——本来.
⑥子——对人的尊称.安——怎么.
⑦遂——就.
⑧亡——失去.
示例 将军功绩已成,威声大震,可以止矣.今若前进,倘不如意,正如“~”也.(明·施耐庵《水浒全传》第一百十回)
英文:draw a snake and add feet to it—ruin the effect by adding sth.superfluous 蛇本来没有脚有人却给它加上脚,故事见《战国策·齐策二》.比喻做事多此一举,反而坏事.例:今若前进,倘不如意,正如画蛇添足也.——《三国演义》


[create_time]2022-08-31 00:27:40[/create_time]2022-09-11 19:01:33[finished_time]1[reply_count]0[alue_good]爱创文化[uname]https://himg.bdimg.com/sys/portrait/item/wise.1.f92c827.kLT93-3VEj2Xt3LY2qUdBA.jpg?time=4761&tieba_portrait_time=4761[avatar]TA获得超过7763个赞[slogan]这个人很懒,什么都没留下![intro]40[view_count]

上一篇:整人专家2

下一篇:查获跨境操纵市场