皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
# 一个字符串或者其子字符串符合一个正则表达式描述的特征,则称为匹配。 # 如: # 字符串 "abc" 和正则表达式 /ab./ 、 /a../ 、 /.../ 均匹配。 # 字符串 "abcd" 和正则表达式 /b./ 、 /b.d/ 匹配。 # 和是否相等操作符 == 类似, perl 语言提供了是否匹配操作符 =~ m ( 其中 m 可以省略) # 使用格式是: # 表达式 =~ m/ 正则表达式 / 或 表达式 =~ / 正则表达式 / # 如果表达式和正则表达式匹配,则返回真,否则返回假。 # 例: chomp ( $input = ); if ( $input =~ m/\d/ ){ print " 输入字符至少包含 1 个数字 " ; } else { print " 输入字符不包含数字 " ; } # != 意为是否不等于,如不等于,则返回真 # !~ 意为是否不匹配,如不匹配,则返回真 # 例: while ( $input !~ /q/ ){ # 当 $input 匹配 q 时退出循环 print ++ $i , " 次输入 \n" ; chomp ( $input = ); } # 作业:按下面的要求编写代码 #屏幕 提示输入手机号码 # 从键盘接收输入,同时去掉换行符 # 判断输入的是否是手机号码(以 1 开头的 8位 数字),如果是则输出 YES # 如果否,则输出 NO
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】A key assumption of new growth theory is that
A.
all technological change is the result of luck.
B.
higher incomes lead to a higher birth rate.
C.
a successful innovator has the opportunity to earn a temporary, above-average profit.
D.
the population growth rate is lower than the real interest rate.
【单选题】An important foundation of the new growth theory is that
A.
we will get more technological advances the more the government is involved in deciding which technology to pursue.
B.
we will get more technological advances the greater the rewards people receive from making technological advances.
C.
the growth rate of the capital stock is more important than the growth rate of new knowledge in generating economic growth.
D.
improvements in labor productivity are poor measures of technological growth.
【多选题】图中的梁有什么特点?【图片】
A.
提供能承受正、负弯矩的足够的混凝土受压区
B.
适用于斜桥和曲线梁桥
C.
力学性能好
D.
跨中剪力小
E.
平面线型的适应性差
F.
横向刚度和抗扭刚度比较差
【单选题】New growth theory assumes that
A.
all inputs experience diminishing returns.
B.
only random technological advances produce growth.
C.
knowledge does not experience diminishing returns.
D.
None of the above answers is correct.
【多选题】图中的梁有什么特点?
A.
适用于斜桥和曲线梁桥
B.
跨中剪力小
C.
提供能承受正、负弯矩的足够的混凝土受压区
D.
平面线型的适应性差
E.
力学性能好
F.
横向刚度和抗扭刚度比较差
【单选题】为测定水中Ca 2+ 、Mg 2+ 的含量,以下消除少量Fe 3+ 、Al 3+ 干扰的方法中,( )是正确的。
A.
于pH=10的氨性溶液中直接加入三乙醇胺
B.
于酸性溶液中加入KCN,然后调制pH=10
C.
于酸性溶液中加入三乙醇胺,然后调至pH=10的氨性溶液
D.
加入三乙醇胺时,不需要考虑溶液的酸碱性
【判断题】在进行中餐宴请时,由两座组成的小桌宴请,当两桌横排时,面对正门右边的为第一桌,左边的为第二桌,即遵循以右为尊,以左为卑的原则
A.
正确
B.
错误
【判断题】如果三人同行,都是男性或都是女性,那么以中间的位置为尊,右边次之,然后是左边。如果是一位女士和两位男士同行,则女士在中间。
A.
正确
B.
错误
【单选题】西方在宴请时,席位的安排上,则以尊重女士为先,以女主人的座位为准,主宾坐在女主人的( )
A.
左边
B.
右边
C.
两边均可
D.
视主宾亲密程度而定
【单选题】New growth theory predicts that
A.
economic growth is only temporary.
B.
economic growth can last indefinitely.
C.
economic growth is eroded by changes in taxes.
D.
government policies can do nothing to foster increased growth.
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题