mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-22 21:52:31 +03:00
correct example gsub in zh-cn-awk
Edit based on the correction of the English original.[1] [1] https://github.com/adambard/learnxinyminutes-docs/pull/4437
This commit is contained in:
parent
1ff2927250
commit
dbcaa68877
@ -179,7 +179,7 @@ function string_functions( localvar, arr) {
|
||||
# 都是返回替换的个数
|
||||
localvar = "fooooobar"
|
||||
sub("fo+", "Meet me at the ", localvar) # localvar => "Meet me at the bar"
|
||||
gsub("e+", ".", localvar) # localvar => "m..t m. at th. bar"
|
||||
gsub("e", ".", localvar) # localvar => "m..t m. at th. bar"
|
||||
|
||||
# 搜索匹配正则的字符串
|
||||
# index() 也是搜索, 不支持正则
|
||||
|
Loading…
Reference in New Issue
Block a user