由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - An interview question for grep in linux (转载)
相关主题
攒人品,有三个mid-office quant positions (2 equities, 1 cre (转载)请问,做Quant, Linux C++该熟悉哪些东西?
两个Quant positions请教一道题
design pattern 怎么准备?[合集] An interview question
面了RBC professional trader group, 狠奇怪[合集] A probability question
Two Trend Tests有人了解pattern matching model么?
又一个码题[合集] a probability question
有没有被面过LINUX问题的?[合集] c++新手问题请教
找工作一定要和自己真正的兴趣所在,就像乔布斯说的那样请教一个比较旧的算法题
相关话题的讨论汇总
话题: grep话题: identify话题: pattern话题: linux话题: question
进入Quant版参与讨论
1 (共1页)
m********g
发帖数: 9
1
【 以下文字转载自 JobHunting 讨论区 】
发信人: mitliqiang (li qiang), 信区: JobHunting
标 题: An interview question for grep in linux
发信站: BBS 未名空间站 (Mon Jan 26 13:48:58 2009)
Using grep, identify the regular expression in a given string such that the
pattern does not repeat. For example, to identify the pattern 'foo' only
once in an input.
'jhkhfoojkkj' should be identified right
'kjhfooaaaaafoo' should not.
How to do that? I tested some, but can not succeed.
Thanks...
k*****h
发帖数: 33
2
grep -E ‘foo[^foo]+$’ filename

【 以下文字转载自 JobHunting 讨论区 】
发信人: mitliqiang (li qiang), 信区: JobHunting
标 题: An interview question for grep in linux
发信站: BBS 未名空间站 (Mon Jan 26 13:48:58 2009)
Using grep, identify the regular expression in a given string such that the
pattern does not repeat. For example, to identify the pattern 'foo' only
once in an input.
'jhkhfoojkkj' should be identified right
'kjhfooaaaaafoo' should not.
How to do that? I tested some, but can not succeed.
Thanks...

【在 m********g 的大作中提到】
: 【 以下文字转载自 JobHunting 讨论区 】
: 发信人: mitliqiang (li qiang), 信区: JobHunting
: 标 题: An interview question for grep in linux
: 发信站: BBS 未名空间站 (Mon Jan 26 13:48:58 2009)
: Using grep, identify the regular expression in a given string such that the
: pattern does not repeat. For example, to identify the pattern 'foo' only
: once in an input.
: 'jhkhfoojkkj' should be identified right
: 'kjhfooaaaaafoo' should not.
: How to do that? I tested some, but can not succeed.

d****2
发帖数: 109
3
"foo/{1,1/}"
1 (共1页)
进入Quant版参与讨论
相关主题
请教一个比较旧的算法题Two Trend Tests
industry用quantlib吗?又一个码题
一道概率题有没有被面过LINUX问题的?
about design patterns找工作一定要和自己真正的兴趣所在,就像乔布斯说的那样
攒人品,有三个mid-office quant positions (2 equities, 1 cre (转载)请问,做Quant, Linux C++该熟悉哪些东西?
两个Quant positions请教一道题
design pattern 怎么准备?[合集] An interview question
面了RBC professional trader group, 狠奇怪[合集] A probability question
相关话题的讨论汇总
话题: grep话题: identify话题: pattern话题: linux话题: question