12345678910111213141516171819202122232425262728 |
- <Window x:Class="Test.RegexTest.WinRegex"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:Test.RegexTest"
- mc:Ignorable="d"
- Title="WinRegex" Height="300" Width="300" FontSize="16">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"></RowDefinition>
- <RowDefinition Height="50"></RowDefinition>
- <RowDefinition ></RowDefinition>
- <RowDefinition Height="Auto"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="100"></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Label Grid.Row="0" Grid.Column="0" Content="Regex" VerticalAlignment="Center"></Label>
- <TextBox Grid.Row="0" Grid.Column="1" Name="Regex" VerticalAlignment="Center" Text="^(?:([A-Z]{4})\s*-\s*\S*)|(?:([A-Z]{6})\s*-\s*\S*)"/>
- <Label Grid.Row="1" Grid.Column="0" Content="Input" VerticalAlignment="Center"></Label>
- <TextBox Grid.Row="1" Grid.Column="1" Name="Input" VerticalAlignment="Center" Text="AVDC-测试设备"/>
- <RichTextBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Name="Output" Margin="0,5"/>
- <Button Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center" Content="检测" VerticalAlignment="Center" Margin="5" Height="30" Width="60" Click="Button_Click"></Button>
- </Grid>
- </Window>
|