-
[C#] 정규식, RegexC#/기초 2025. 2. 18. 15:26
EX) SINT
(-12[0-8]|-1[01][0-9]|-[1-9][0-9]?|0|[1-9][0-9]?|1[01][0-9]|12[0-7])
# 해석
-120~128 or -100~109, -110~-119 or -1~-9, -10 ~ -99 or 0 or 1~9, 10 ~ 99 or 100~119 or 120~127
EX)
TextEdit
<DataTemplate x:Key="INT"> <dxe:TextEdit Name="PART_Editor" MaskType="RegEx" Mask="(-3276[0-8]|-327[0-5][0-9]|-32[0-6][0-9]{2}|-3[01][0-9]{3}|-[1-2][0-9]{0,4}|-[1-9][0-9]?[0-9]?[0-9]?|0|[1-9][0-9]?[0-9]?[0-9]?|[1-2][0-9]{0,4}|3[01][0-9]{3}|32[0-6][0-9]{2}|327[0-5][0-9]|3276[0-7])" MaskShowPlaceHolders="True" NullText="-32768 ~ 32767" Text="{Binding SetValue}"/> </DataTemplate>
SpinEdit
<DataTemplate x:Key="INT"> <dxe:SpinEdit Name="PART_Editor" MaskType="Numeric" Mask="D" MaxValue="32767" MinValue="-32768" MaskShowPlaceHolders="True" NullText="-32768 ~ 32767" Text="{Binding SetValue}"/> </DataTemplate>
https://jeongwoo.tistory.com/82
[Regex] 정규식 / 정규표현식 (Regular Expression, Regex)
개요 정규식을 사용하기 위해서는 패턴, 기호, 플래그, 메서드를 알아야한다. 정규식 docs 사이트 링크: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions 정규식 테스트 사이트 링크:
jeongwoo.tistory.com
Masked Input | WPF Controls | DevExpress Documentation
Most text editors (TextEdit descendants) shipped with the WPF Data Editors Library allow you to use masks during editing. Masks provide restricted data input and formatted data output. Using masks in editors is useful when an entered string needs to match
docs.devexpress.com
728x90'C# > 기초' 카테고리의 다른 글
[C#] CLR (Common Language Runtime) (0) 2025.03.18 [C#] ASP.NET Core (0) 2025.02.26 [C#] object to List<> (0) 2025.02.12 [C#] C# dll COM (0) 2025.01.21 [C#] gRPC Exception (0) 2025.01.14