실수추출 (1) 썸네일형 리스트형 [C#]문자열에서 실수부분만 추출 /// /// 문자열에서 실수부분만 추출 /// /// /// public string getRealNumber(string number) { string tempValue = "0"; try { Regex pattern = new Regex(@"[0-9]+(\.|\,)[0-9]+"); Match match = pattern.Match(number); tempValue = match.Value; } catch (Exception ex) { Console.WriteLine(ex.ToString()); } return tempValue; } 이전 1 다음