Skip to content

[软技能] 第98天 不查资料,你会手写正则吗? #974

Open
@haizhilin2013

Description

@haizhilin2013

第98天 不查资料,你会手写正则吗?

Activity

dondonZh

dondonZh commented on Jul 23, 2019

@dondonZh

不会呀

NicholasBaiYa

NicholasBaiYa commented on Jul 23, 2019

@NicholasBaiYa

这个真不会。没有特意学过正则。

ghost

ghost commented on Jul 23, 2019

@ghost

会。

xxf1996

xxf1996 commented on Jul 23, 2019

@xxf1996

会一些常用的;

shuai4983958

shuai4983958 commented on Jul 23, 2019

@shuai4983958

不会

hunterhug

hunterhug commented on Jul 23, 2019

@hunterhug

复杂的正则需要调试,就像手写代码一样,不跑一下永远不知道是不是百分百正确

goldEli

goldEli commented on Jul 23, 2019

@goldEli

最好不要直接百度拿一串自己看不懂的正则来用。
推荐这篇文章老姚JS正则表达式完整教程,很感谢作者帮我理清了思路,虽然我很多特性还是记不住,至少让我知道了我要写一个正则需要哪些步骤,怎么做,然后再去查。

haizhilin2013

haizhilin2013 commented on Jul 23, 2019

@haizhilin2013
CollaboratorAuthor

@lifetimelovez 在这求助?

haochi1999

haochi1999 commented on Jul 23, 2019

@haochi1999

@haizhilin2013 不好意思 删了

wyx2014

wyx2014 commented on Jul 25, 2019

@wyx2014

关键记不住,用到时候看看资料,慢慢调试就能写出来

censek

censek commented on Jan 15, 2020

@censek
  • ^:匹配以...开头的的字符串
  • $:匹配以...结尾的的字符串
  • ^$同时使用:精确匹配
  • []:匹配字符组的一个列表
lizhesystem

lizhesystem commented on Jul 15, 2020

@lizhesystem

简单的还是可以写出来的,不过有时候写复杂的话 规则考虑的不全面 会有遗漏。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@wyx2014@hunterhug@xxf1996@goldEli

        Issue actions

          [软技能] 第98天 不查资料,你会手写正则吗? · Issue #974 · haizlin/fe-interview