WinRegex.xaml 1.7 KB

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