vb.net - how to substring and return the value in between the blacket -
How can I replace the string, e.g. "A1 (value)" and return me "value" ? You can use
RegularExpression :
dim RR = "A1 (value) ... (other value)" dim pattern = "\ (([^)] *) \" slow rijks = new system. Text. Regular Expression Reggae (pattern, system text. RegularExpressions.RegexOptions.Compiled) slow firstBracket = regex.Match (str) if firstBracket.Value.Length & lt; & Gt; 0 then 'free' bronchitis = first bracket.value Substrings (1, first bracket.value.length - 2) 'value' end if
Comments
Post a Comment