简体   繁体   中英

Extract characters in double quotes from a string in vb.net

vb.net ,我将如何提取以下字符串的路径,以便最终得到: C:\\Users\\User\\AppData\\Roaming\\HDH\\hds_remove.vbs

CSCRIPT //NOLOGO "C:\Users\User\AppData\Roaming\HDH\hds_remove.vbs"

First call IndexOf to get the indices of the quotes.

Then call SubString to extract the path between the quotes.

Simply

   Dim tex = "CSCRIPT //NOLOGO \"C:\Users\User\AppData\Roaming\HDH\hds_remove.vbs\""
   Dim substring As String = text.Substring(18, str.Length()-2)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM