您现在的位置是:首页 > 电脑 > 

如何提取一部分字符串?(How to extract a part of string?)

2025-07-19 16:33:16
如何提取一部分字符串?(How to extract a part of string?) 我有字符串包含一个路径 string="toto.titi.1.tata.2.abc.def" 我想提取位于toto.titi.1.tata.2.之后的子字符串toto.titi.1.tata.2. 。 但这里的1和2是示例,可以是其他数字。 一般来说:我
如何提取一部分字符串?(How to extract a part of string?)

我有字符串包含一个路径

string="2.abc.def"

我想提取位于2.之后的子字符串2. 。 但这里的1和2是示例,可以是其他数字。

一般来说:我想提取位于[i].tata.[j].之后的子串[i].tata.[j]. 。

[i]和[j]是一个数字

怎么做?

I have string contains a path

string="2.abc.def"

I want to extract the substring which is situated after 2.. but 1 and 2 here are examples and could be other numbers.

In general: I want to extract the substring which situated after [i].tata.[j]..

[i] and [j] are a numbers

How to do it?

最满意答案

你可以使用剪切

echo $string | cut -f6- -d'.'

You can use cut

echo $string | cut -f6- -d'.'

#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格

本文地址:http://www.dnpztj.cn/diannao/648965.html

相关标签:无
上传时间: 2023-07-26 17:24:44
留言与评论(共有 10 条评论)
本站网友 活力广东
4分钟前 发表
一般来说:我想提取位于[i].tata.[j].之后的子串[i].tata.[j].
本站网友 烟草企业
17分钟前 发表
I want to extract the substring which situated after [i].tata.[j].. [i] and [j] are a numbers How to do it? 最满意答案 你可以使用剪切 echo $string | cut -f6- -d'.' You can use cut echo $string | cut -f6- -d'.'
本站网友 mp3录音机破解版
24分钟前 发表
[i]和[j]是一个数字 怎么做? I have string contains a path string="2.abc.def" I want to extract the substring which is situated after 2.. but 1 and 2 here are examples and could be other numbers. In general
本站网友 分割文件
4分钟前 发表
I want to extract the substring which situated after [i].tata.[j].. [i] and [j] are a numbers How to do it? 最满意答案 你可以使用剪切 echo $string | cut -f6- -d'.' You can use cut echo $string | cut -f6- -d'.'
本站网友 仙剑奇侠传三电视剧下载
19分钟前 发表
如何提取一部分字符串?(How to extract a part of string?) 我有字符串包含一个路径 string="2.abc.def" 我想提取位于2.之后的子字符串2.
本站网友 华士镇租房
28分钟前 发表
[i]和[j]是一个数字 怎么做? I have string contains a path string="2.abc.def" I want to extract the substring which is situated after 2.. but 1 and 2 here are examples and could be other numbers. In general
本站网友 新浪评论
5分钟前 发表
可以是其他数字
本站网友 最好的奶粉品牌
27分钟前 发表
I want to extract the substring which situated after [i].tata.[j].. [i] and [j] are a numbers How to do it? 最满意答案 你可以使用剪切 echo $string | cut -f6- -d'.' You can use cut echo $string | cut -f6- -d'.'
本站网友 扬州房地产
11分钟前 发表
如何提取一部分字符串?(How to extract a part of string?) 我有字符串包含一个路径 string="2.abc.def" 我想提取位于2.之后的子字符串2.