mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-13 18:24:39 +02:00
Merge pull request #4443 from nbehrnd/zn-cn-awk
[AWK/zh-cn] correct example gsub
This commit is contained in:
@@ -179,7 +179,7 @@ function string_functions( localvar, arr) {
|
|||||||
# 都是返回替换的个数
|
# 都是返回替换的个数
|
||||||
localvar = "fooooobar"
|
localvar = "fooooobar"
|
||||||
sub("fo+", "Meet me at the ", localvar) # localvar => "Meet me at the bar"
|
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() 也是搜索, 不支持正则
|
# index() 也是搜索, 不支持正则
|
||||||
|
Reference in New Issue
Block a user