Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]字符串如何获取第一个汉字的位置

1楼
xubing051018 发表于:2023/12/20 10:35:00
求教,如题
如果获取一个字符串中第一个汉字出现的位置
[此贴子已经被作者于2023/12/20 10:39:10编辑过]
2楼
有点蓝 发表于:2023/12/20 11:05:00
Dim pattern As String = "[^\u4e00-\u9fa5]"
Dim txt As String = "112地方地方好483"
Dim str = System.Text.RegularExpressions.Regex.Replace(txt , pattern , "")
Output.Show(str )
Dim idx As Integer = txt.IndexOf(str(0))
Output.Show(idx)
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01953 s, 2 queries.