加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

正则表达式 – 在50,000个HTML页面中查找电话号码

发布时间:2020-12-14 06:34:43 所属栏目:百科 来源:网络整理
导读:如何在50,000个HTML页面中找到电话号码? Jeff Attwood posted 5 Questions for programmers applying for jobs: In an effort to make life simpler for phone screeners,I’ve put together this list of Five Essential Questions that you need to ask d
如何在50,000个HTML页面中找到电话号码?

Jeff Attwood posted 5 Questions for programmers applying for jobs:

In an effort to make life simpler for phone screeners,I’ve put together
this list of Five Essential Questions
that you need to ask during an SDE
screen. They won’t guarantee that your
candidate will be great,but they will
help eliminate a huge number of
candidates who are slipping through
our process today.

1) Coding The candidate has to write
some simple code,with correct syntax,
in C,C++,or Java.

2) OO design The candidate has to
define basic OO concepts,and come up
with classes to model a simple
problem.

3) Scripting and regexes The
candidate has to describe how to find
the phone numbers in 50,000 HTML
pages.

4) Data structures The candidate has
to demonstrate basic knowledge of the
most common data structures.

5) Bits and bytes The candidate has
to answer simple questions about bits,
bytes,and binary numbers.

Please understand: what I’m looking
for here is a total vacuum in one of
these areas. It’s OK if they struggle
a little and then figure it out. It’s
OK if they need some minor hints or
prompting. I don’t mind if they’re
rusty or slow. What you’re looking for
is candidates who are utterly
clueless,or horribly confused,about
the area in question.

07000

注意:Steve Yegge最初提出了这个问题。

egrep "(([0-9]{1,2}.)?[0-9]{3}.[0-9]{3}.[0-9]{4})" . -R --include='*.html'

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读