...最后面匹配$substring的最短的子串${string%%substring} 删除最后面匹配$substring的最长的子串替换子串(Substring Replacement)${string/substring/replacement} 把第一个匹配的$substring替换为$replacement${string//substring/replacement} 把所有匹配的$...
基于24个网页-相关网页
... Identifying and Comparing Strings:识别和比较字符串 Replacing Substrings:替换子串 Finding Characters and Substrings:查找字符和子串 ...
基于1个网页-相关网页
即使在这样一小段脚本中,您也可以找到一些参数扩展,包括长度、子字符串、模式匹配和模式替换。
You'll recognize several parameter expansions, including length, substring, pattern matching, and pattern replacement in even this short piece of script.
替换字符串可能包含对在之前的匹配中捕获的子序列的引用。
The replacement string may contain references to subsequences captured during the previous match.
正则表达式基本上就是为进行文本处理而构建的一种小型的子语言,用来进行字符串的匹配和替换。
Regular expressions are basically a small sub-language built for text processing, used to match and replace strings of characters.
应用推荐