├── .gitattributes ├── .gitignore ├── README.md ├── docs └── user_guide.docx ├── images ├── IcoFile.ico ├── IcoInput.ico ├── main_window.png ├── main_window_vertical.png ├── main_window_vertical_desc.png ├── regexator.ico └── regexator.png ├── src ├── Regexator.Core │ ├── BinarySearcher.cs │ ├── ClipboardMode.cs │ ├── Collections │ │ └── Generic │ │ │ ├── EnumerableExtensions.cs │ │ │ ├── ICollectionExtensions.cs │ │ │ ├── IListExtensions.cs │ │ │ ├── LimitedCollection.cs │ │ │ └── SortableBindingList.cs │ ├── Command.cs │ ├── CommandHistory.cs │ ├── ContainerProps.cs │ ├── ContainerPropsExtensions.cs │ ├── Drawing │ │ ├── BrightnessColorSorter.cs │ │ ├── ColorSortMode.cs │ │ ├── DrawingUtility.cs │ │ ├── HueColorSorter.cs │ │ ├── NameColorSorter.cs │ │ ├── PrintUtility.cs │ │ └── RichTextBoxPrintDocument.cs │ ├── EnumHelper.cs │ ├── EnumParseResult.cs │ ├── Enums.cs │ ├── ErrorInfo.cs │ ├── Extensions │ │ ├── EnumExtensions.cs │ │ ├── ExceptionExtensions.cs │ │ ├── Extensions.cs │ │ └── StringExtensions.cs │ ├── FileSystem │ │ ├── ClipboardItem.cs │ │ ├── ClipboardManager.cs │ │ ├── ContextMenuStripFactory.cs │ │ ├── CopySuffixGenerator.cs │ │ ├── Dialogs.cs │ │ ├── DirectoryCommand.cs │ │ ├── DirectoryNode.cs │ │ ├── DragDrop.cs │ │ ├── DragItem.cs │ │ ├── EnumUtility.cs │ │ ├── Enums.cs │ │ ├── Exceptions.cs │ │ ├── Executor.cs │ │ ├── FileConnection.cs │ │ ├── FileErrorInfo.cs │ │ ├── FileInputCommand.cs │ │ ├── FileInputNode.cs │ │ ├── FileSystemCommand.cs │ │ ├── FileSystemHistory.cs │ │ ├── FileSystemManager.cs │ │ ├── FileSystemNode.cs │ │ ├── FileSystemSearchSettings.cs │ │ ├── FileSystemTreeView.cs │ │ ├── FileSystemUtility.cs │ │ ├── IClipboardNode.cs │ │ ├── IInputContainer.cs │ │ ├── INode.cs │ │ ├── InputCommand.cs │ │ ├── InputNode.cs │ │ ├── InvalidInputNode.cs │ │ ├── InvalidNode.cs │ │ ├── InvalidProjectNode.cs │ │ ├── ItemKind.cs │ │ ├── KeyProcessor.cs │ │ ├── NodeFactory.cs │ │ ├── NodeImageIndex.cs │ │ ├── NodeSorter.cs │ │ ├── OpenMode.cs │ │ ├── ProjectCommand.cs │ │ ├── ProjectNode.cs │ │ ├── RecentDirectory.cs │ │ ├── RecentItem.cs │ │ ├── RecentManager.cs │ │ ├── RecentProject.cs │ │ ├── RootNode.cs │ │ ├── SaveEventArgs.cs │ │ ├── SaveExecutor.cs │ │ ├── SaveManager.cs │ │ ├── SaveMode.cs │ │ ├── SuffixGenerator.cs │ │ └── View.cs │ ├── FileSystemSearchInfo.cs │ ├── FormatGroup.cs │ ├── FormatInfo.cs │ ├── GroupSettingsHelper.cs │ ├── GuideItem.cs │ ├── GuideSearchManager.cs │ ├── HtmlUtility.cs │ ├── ICommand.cs │ ├── IO │ │ ├── FileLock.cs │ │ ├── FileNamePart.cs │ │ ├── FileSystem.cs │ │ ├── FileSystemEntry.cs │ │ ├── FileSystemInfoExtensions.cs │ │ ├── FileSystemSearcher.cs │ │ ├── FileSystemUtility.cs │ │ ├── SearchMode.cs │ │ ├── SearchResult.cs │ │ ├── SearchResultEqualityComparer.cs │ │ ├── SearchResultSorter.cs │ │ ├── SearchResultState.cs │ │ └── XmlSanitizingStreamReader.cs │ ├── IndexSearcher.cs │ ├── IndexSearcherItem.cs │ ├── IndexSearcherResult.cs │ ├── Input.cs │ ├── InputCollection.cs │ ├── InputKind.cs │ ├── InputOptions.cs │ ├── InputProps.cs │ ├── InputPropsExtensions.cs │ ├── Int32BinarySearcher.cs │ ├── ItemAttributes.cs │ ├── ItemAttributesExtensions.cs │ ├── KeyStates.cs │ ├── KeyboardUtility.cs │ ├── LocalizedDisplayNameAttribute.cs │ ├── MessageDialog.cs │ ├── MessageResult.cs │ ├── NativeMethods.cs │ ├── NewItemCommand.cs │ ├── Output │ │ ├── CaptureBlock.cs │ │ ├── CaptureBlockIterator.cs │ │ ├── CaptureInfoSelections.cs │ │ ├── Enums.cs │ │ ├── InfoSelections.cs │ │ ├── MatchBuilder.cs │ │ ├── MatchTableBuilder.cs │ │ ├── MatchTextBuilder.cs │ │ ├── MatchTextIterator.cs │ │ ├── OutputFormatter.cs │ │ ├── OutputSettings.cs │ │ ├── RegexBlock.cs │ │ ├── RegexBuilder.cs │ │ ├── ReplaceBlock.cs │ │ ├── ReplaceBuilder.cs │ │ ├── ReplaceOutputProcessor.cs │ │ ├── SplitBlock.cs │ │ ├── SplitBlockIterator.cs │ │ ├── SplitBuilder.cs │ │ ├── SplitTextBuilder.cs │ │ ├── TextAlignment.cs │ │ └── TextBuilder.cs │ ├── OutputInfo.cs │ ├── OutputOptions.cs │ ├── Pattern.cs │ ├── PatternOptions.cs │ ├── Project.cs │ ├── ProjectContainer.cs │ ├── ProjectInfo.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RedrawDisabler.cs │ ├── RegexCategory.cs │ ├── RegexCategoryInfo.cs │ ├── RegexInfo.cs │ ├── RegexOptionsCollection.cs │ ├── RegexOptionsItem.cs │ ├── RegexOptionsManager.cs │ ├── Regexator.Core.csproj │ ├── Replacement.cs │ ├── ReplacementOptions.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Resources │ │ ├── IcoArrowLeft.ico │ │ ├── IcoArrowRight.ico │ │ ├── IcoArrowRightSmall.ico │ │ ├── IcoCheckAll.ico │ │ ├── IcoChecked.ico │ │ ├── IcoCheckedAll.ico │ │ ├── IcoCheckedNone.ico │ │ ├── IcoCheckedNot.ico │ │ ├── IcoClose.ico │ │ ├── IcoCode.ico │ │ ├── IcoCodeError.ico │ │ ├── IcoCodeNew.ico │ │ ├── IcoCodeOpen.ico │ │ ├── IcoCodeSelected.ico │ │ ├── IcoCodeSolution.ico │ │ ├── IcoCollapseAll.ico │ │ ├── IcoCopy.ico │ │ ├── IcoCultureInvariant.ico │ │ ├── IcoCut.ico │ │ ├── IcoDelete.ico │ │ ├── IcoECMAScript.ico │ │ ├── IcoExpandAll.ico │ │ ├── IcoFile.ico │ │ ├── IcoFileError.ico │ │ ├── IcoFileNew.ico │ │ ├── IcoFilePlus.ico │ │ ├── IcoFileSelected.ico │ │ ├── IcoFolder.ico │ │ ├── IcoFolderOpen.ico │ │ ├── IcoHeart.ico │ │ ├── IcoIgnoreCase.ico │ │ ├── IcoInfo.ico │ │ ├── IcoInput.ico │ │ ├── IcoInputNew.ico │ │ ├── IcoInputSelected.ico │ │ ├── IcoInsertSnippet.ico │ │ ├── IcoInsertSnippet2.ico │ │ ├── IcoMatchCase.ico │ │ ├── IcoMatchWhole.ico │ │ ├── IcoNewFolder.ico │ │ ├── IcoNewItem.ico │ │ ├── IcoNewProjectWithFileInput.ico │ │ ├── IcoNewProjectWithInput.ico │ │ ├── IcoOpen.ico │ │ ├── IcoPaste.ico │ │ ├── IcoReload.ico │ │ ├── IcoRename.ico │ │ ├── IcoReplace.ico │ │ ├── IcoReplaceAll.ico │ │ ├── IcoSnippet.ico │ │ ├── IcoSnippetExtensible.ico │ │ ├── IcoSquareBrackets.ico │ │ ├── IcoUncheckAll.ico │ │ ├── Regexator.ico │ │ └── XmlRegexOptionsItems.txt │ ├── RichTextBoxUtility.cs │ ├── ScrollBlocker.cs │ ├── SearchManagerBase.cs │ ├── Snippets │ │ ├── CodeSense.Designer.cs │ │ ├── CodeSense.cs │ │ ├── CodeSense.resx │ │ ├── Enums.cs │ │ ├── ExtendedSnippetInfo.cs │ │ ├── LiteralInfo.cs │ │ ├── RegexSnippet.cs │ │ ├── SenseDataGridView.cs │ │ ├── SenseItem.cs │ │ ├── SenseItemSorter.cs │ │ ├── SenseTextBox.cs │ │ ├── Snippet.cs │ │ ├── SnippetCodeKind.cs │ │ ├── SnippetCodeSenseItem.cs │ │ ├── SnippetErrorInfo.cs │ │ ├── SnippetInsertProcessor.cs │ │ ├── SnippetKinds.cs │ │ ├── SnippetLiteral.cs │ │ ├── SnippetLiteralEditor.Designer.cs │ │ ├── SnippetLiteralEditor.cs │ │ ├── SnippetLiteralEditor.resx │ │ ├── SnippetOrigin.cs │ │ ├── SnippetSearchManager.cs │ │ ├── SnippetSenseItem.cs │ │ ├── SnippetTitleSenseItem.cs │ │ └── UserControl1.resx │ ├── Text │ │ ├── BracketKind.cs │ │ ├── CSharpBuilder.cs │ │ ├── Captions.cs │ │ ├── CarriageReturnProcessor.cs │ │ ├── CodeBuilder.cs │ │ ├── CodeBuilderSettings.cs │ │ ├── CodeImporter.cs │ │ ├── ConcatOperatorPosition.cs │ │ ├── EncodingItem.cs │ │ ├── EnumHelper.cs │ │ ├── ExportMode.cs │ │ ├── Extensions.cs │ │ ├── FindResult.cs │ │ ├── FormattedValue.cs │ │ ├── INewLineMode.cs │ │ ├── ITextContainer.cs │ │ ├── Indenter.cs │ │ ├── InputTextProcessor.cs │ │ ├── NewLineLiteral.cs │ │ ├── NewLineMode.cs │ │ ├── OutputSearchDefinition.cs │ │ ├── PatternFormatter.cs │ │ ├── RegexLibrary.cs │ │ ├── RegexOptionsUtility.cs │ │ ├── RegularExpressions │ │ │ ├── AsciiChar.cs │ │ │ ├── CaptureEqualityComparer.cs │ │ │ ├── CaptureItem.cs │ │ │ ├── CaptureItemCollection.cs │ │ │ ├── CaptureItemEqualityComparer.cs │ │ │ ├── CharEscapeMode.cs │ │ │ ├── CharMatchInfo.cs │ │ │ ├── EnumerableExtensions.cs │ │ │ ├── Extensions │ │ │ │ └── RegexExtensions.cs │ │ │ ├── GeneralCategory.cs │ │ │ ├── GroupEqualityComparer.cs │ │ │ ├── GroupInfo.cs │ │ │ ├── GroupInfoCollection.cs │ │ │ ├── GroupInfoIndexEqualityComparer.cs │ │ │ ├── GroupInfoSorter.cs │ │ │ ├── GroupItem.cs │ │ │ ├── GroupItemCollection.cs │ │ │ ├── GroupItemEqualityComparer.cs │ │ │ ├── GroupSettings.cs │ │ │ ├── GroupSortProperty.cs │ │ │ ├── GroupSplitItem.cs │ │ │ ├── LimitState.cs │ │ │ ├── MatchData.cs │ │ │ ├── MatchEqualityComparer.cs │ │ │ ├── MatchItem.cs │ │ │ ├── MatchItemCollection.cs │ │ │ ├── MatchItemEqualityComparer.cs │ │ │ ├── MatchSplitItem.cs │ │ │ ├── NamedBlock.cs │ │ │ ├── RegexReplacer.cs │ │ │ ├── RegexSplit.cs │ │ │ ├── RegexUtility.cs │ │ │ ├── ReplaceData.cs │ │ │ ├── ReplaceItem.cs │ │ │ ├── ReplaceItemCollection.cs │ │ │ ├── ReplaceItemEqualityComparer.cs │ │ │ ├── ReplaceResult.cs │ │ │ ├── ReplaceResultEqualityComparer.cs │ │ │ ├── ReplacementMode.cs │ │ │ ├── ReplacementSettings.cs │ │ │ ├── SplitData.cs │ │ │ ├── SplitItem.cs │ │ │ ├── SplitItemCollection.cs │ │ │ ├── SplitItemEqualityComparer.cs │ │ │ ├── SplitItemKind.cs │ │ │ ├── SplitOptions.cs │ │ │ └── Syntax.cs │ │ ├── RichTextBoxSearcher.cs │ │ ├── RichTextBoxWrapper.cs │ │ ├── SearchDefinition.cs │ │ ├── SearchHelper.cs │ │ ├── SearchMatch.cs │ │ ├── SearchOptions.cs │ │ ├── SearcherState.cs │ │ ├── SummaryBuilder.cs │ │ ├── SummaryBuilderBase.cs │ │ ├── SummaryElement.cs │ │ ├── SummaryElements.cs │ │ ├── SummaryInfo.cs │ │ ├── SummarySettings.cs │ │ ├── Symbols.cs │ │ ├── TextBoxSummaryBuilder.cs │ │ ├── TextLine.cs │ │ ├── TextProcessor.cs │ │ ├── TextSearcher.cs │ │ ├── TextSpan.cs │ │ ├── TextSpanComparer.cs │ │ ├── TextSpanExtensions.cs │ │ ├── TextUtility.cs │ │ └── VisualBasicBuilder.cs │ ├── TextSearchMode.cs │ ├── UI │ │ ├── CharacterAnalyzerForm.Designer.cs │ │ ├── CharacterAnalyzerForm.cs │ │ ├── CharacterAnalyzerForm.resx │ │ ├── EnumUtility.cs │ │ ├── Enums.cs │ │ ├── ErrorInfoDataGridView.cs │ │ ├── ErrorInfoForm.Designer.cs │ │ ├── ErrorInfoForm.cs │ │ ├── ErrorInfoForm.resx │ │ ├── FindToolStrip.cs │ │ ├── GroupDataGridView.cs │ │ ├── GroupInfoItem.cs │ │ ├── NewItemForm.Designer.cs │ │ ├── NewItemForm.cs │ │ ├── NewItemForm.resx │ │ ├── ProjectDeleteForm.Designer.cs │ │ ├── ProjectDeleteForm.cs │ │ ├── ProjectDeleteForm.resx │ │ ├── ProjectInfoPropertyGrid.cs │ │ ├── RegexOptionsDataGridView.cs │ │ ├── RegexOptionsPanel.cs │ │ ├── SaveForm.Designer.cs │ │ ├── SaveForm.cs │ │ ├── SaveForm.resx │ │ ├── SaveFormTreeView.cs │ │ ├── SearchToolStrip.cs │ │ ├── SwitcherItem.cs │ │ └── SwitcherItemCollection.cs │ ├── UndoEventArgs.cs │ ├── ValueRestorer.cs │ ├── VersionConverter.cs │ ├── Windows │ │ └── Forms │ │ │ ├── ColorComboBox.cs │ │ │ ├── ColorPicker.cs │ │ │ ├── ColorPickerForm.cs │ │ │ ├── ColorPickerForm.resx │ │ │ ├── ColorPickerTableLayoutPanel.cs │ │ │ ├── ControlExtensions.cs │ │ │ ├── DataGridViewColumnCollectionExtensions.cs │ │ │ ├── DataGridViewColumnExtensions.cs │ │ │ ├── DataGridViewColumnInfo.cs │ │ │ ├── DataGridViewDisableButtonCell.cs │ │ │ ├── DataGridViewDisableButtonColumn.cs │ │ │ ├── DataGridViewExtensions.cs │ │ │ ├── DataGridViewRowCollectionExtensions.cs │ │ │ ├── DataGridViewRowExtensions.cs │ │ │ ├── ExtendedDataGridView.cs │ │ │ ├── ExtendedListView.cs │ │ │ ├── ExtendedListView.resx │ │ │ ├── ExtendedRichTextBox.cs │ │ │ ├── ExtendedSplitContainer.cs │ │ │ ├── ExtendedTabControl.cs │ │ │ ├── ExtendedTextBox.cs │ │ │ ├── ExtendedToolStrip.cs │ │ │ ├── ExtendedTreeView.cs │ │ │ ├── FormExtensions.cs │ │ │ ├── ListViewExtensions.cs │ │ │ ├── ListViewItemComparer.cs │ │ │ ├── RichTextBoxExtensions.cs │ │ │ ├── SelectionMemento.cs │ │ │ ├── TabControlExtensions.cs │ │ │ ├── TabPageExtensions.cs │ │ │ ├── TextBoxBaseExtensions.cs │ │ │ ├── TextBoxTextSpan.cs │ │ │ ├── TextBoxUtility.cs │ │ │ ├── ToolStripDropDownExtensions.cs │ │ │ ├── ToolStripItemCollectionExtensions.cs │ │ │ ├── ToolStripSpringTextBox.cs │ │ │ ├── TreeNodeExtensions.cs │ │ │ └── TreeViewExtensions.cs │ └── Xml │ │ ├── Serialization │ │ ├── FormatGroup.cs │ │ ├── FormatInfo.cs │ │ ├── GuideItem.cs │ │ ├── Projects │ │ │ ├── FileSystemSearchInfo.cs │ │ │ ├── GroupSettings.cs │ │ │ ├── Input.cs │ │ │ ├── OutputInfo.cs │ │ │ ├── Pattern.cs │ │ │ ├── Project.cs │ │ │ ├── ProjectInfo.cs │ │ │ ├── ProjectSerializationCancelEventArgs.cs │ │ │ ├── ProjectSerializationEventArgs.cs │ │ │ ├── ProjectSerializer.cs │ │ │ ├── ProjectsElement.cs │ │ │ └── Replacement.cs │ │ ├── ProjectsVersionLessThan1 │ │ │ ├── GroupSettings.cs │ │ │ ├── Input.cs │ │ │ ├── OutputInfo.cs │ │ │ ├── Project.cs │ │ │ ├── ProjectContainer.cs │ │ │ ├── ProjectInfo.cs │ │ │ ├── ProjectsElement.cs │ │ │ └── Replacement.cs │ │ ├── ProjectsVersionLessThan2 │ │ │ ├── GroupSettings.cs │ │ │ ├── Input.cs │ │ │ ├── OutputInfo.cs │ │ │ ├── Pattern.cs │ │ │ ├── Project.cs │ │ │ ├── ProjectInfo.cs │ │ │ ├── ProjectsElement.cs │ │ │ └── Replacement.cs │ │ ├── RegexCategoryInfo.cs │ │ ├── RegexOptionsItem.cs │ │ ├── Snippets │ │ │ ├── CodeElement.cs │ │ │ ├── HeaderElement.cs │ │ │ ├── RegexSnippet.cs │ │ │ ├── RegexSnippetsElement.cs │ │ │ ├── SnippetElement.cs │ │ │ ├── SnippetInfo.cs │ │ │ ├── SnippetLiteral.cs │ │ │ └── SnippetSerializer.cs │ │ ├── XmlSerializationManager.cs │ │ └── XmlSerializationManagerOfT.cs │ │ └── XmlUtility.cs ├── Regexator.sln ├── Regexator │ ├── App.vb │ ├── AppDialogs.vb │ ├── AppForms.vb │ ├── AppPaths.vb │ ├── AppSettings.vb │ ├── AppToolStripRenderer.vb │ ├── AppUtility.vb │ ├── Commands.vb │ ├── Controls │ │ ├── AppFindToolStrip.vb │ │ ├── AppLiteralEditor.vb │ │ ├── AppSearchToolStrip.vb │ │ ├── AppTabControl.vb │ │ ├── AppToolStrip.vb │ │ ├── CurrentLineBox.Designer.vb │ │ ├── CurrentLineBox.vb │ │ ├── ExportRichTextBox.vb │ │ ├── FileSystemSearchBox.Designer.vb │ │ ├── FileSystemSearchBox.resx │ │ ├── FileSystemSearchBox.vb │ │ ├── FileSystemSearchDataGridView.vb │ │ ├── FileSystemSearchResultsContextMenuStrip.vb │ │ ├── FileSystemSearchResultsDataGridView.vb │ │ ├── FileSystemSearchTextBox.vb │ │ ├── FindRichTextBox.vb │ │ ├── FormattedPatternRichTextBox.vb │ │ ├── InputRichTextBox.vb │ │ ├── MainMenuStrip.vb │ │ ├── MainToolStrip.vb │ │ ├── OptionToolStripButton.vb │ │ ├── OutputDataGridView.vb │ │ ├── OutputRichTextBox.vb │ │ ├── OutputToolStrip.vb │ │ ├── PatternRichTextBox.vb │ │ ├── RegexRichTextBox.vb │ │ ├── ReplacementRichTextBox.vb │ │ ├── SearchTextBox.vb │ │ ├── SnippetDirectoryDataGridView.vb │ │ ├── SnippetSense.vb │ │ ├── SummaryRichTextBox.vb │ │ └── SwitcherContextMenuStrip.vb │ ├── DataManager.vb │ ├── Docs │ │ ├── eula.rtf │ │ ├── user_guide.mht │ │ └── user_guide.pdf │ ├── Enums.vb │ ├── ExplorerStatusStripRenderer.vb │ ├── Exporter.vb │ ├── FileSystemSearchInfo.vb │ ├── Formats.vb │ ├── FormattedPatternTab.vb │ ├── Forms │ │ ├── AboutForm.Designer.vb │ │ ├── AboutForm.resx │ │ ├── AboutForm.vb │ │ ├── EulaForm.Designer.vb │ │ ├── EulaForm.resx │ │ ├── EulaForm.vb │ │ ├── GuideForm.Designer.vb │ │ ├── GuideForm.resx │ │ ├── GuideForm.vb │ │ ├── MainForm.Designer.vb │ │ ├── MainForm.resx │ │ ├── MainForm.vb │ │ ├── OptionsForm.Designer.vb │ │ ├── OptionsForm.resx │ │ ├── OptionsForm.vb │ │ ├── UserGuideForm.Designer.vb │ │ ├── UserGuideForm.resx │ │ └── UserGuideForm.vb │ ├── HighlightOptions.vb │ ├── MenuFactory.vb │ ├── My Project │ │ ├── Application.Designer.vb │ │ ├── Application.myapp │ │ ├── AssemblyInfo.vb │ │ ├── Resources.Designer.vb │ │ ├── Resources.resx │ │ ├── Settings.Designer.vb │ │ ├── Settings.settings │ │ └── app.manifest │ ├── NativeMethods.vb │ ├── Panels │ │ ├── ExplorerPanel.vb │ │ ├── ExportPanel.vb │ │ ├── FileSystemSearchResultsPanel.vb │ │ ├── FindResultsPanel.vb │ │ ├── GroupPanel.vb │ │ ├── InfoPanel.vb │ │ ├── InputPanel.vb │ │ ├── OutputPanel.vb │ │ ├── OutputTablePanel.vb │ │ ├── OutputTextPanel.vb │ │ ├── Panels.vb │ │ ├── PatternPanel.vb │ │ ├── RegexOptionsPanel.vb │ │ ├── ReplacementPanel.vb │ │ └── SummaryPanel.vb │ ├── RecentSnippetItem.vb │ ├── Regexator.vbproj │ ├── RegexatorApplication.vb │ ├── Resources │ │ ├── BasicLatinCharacters.txt │ │ ├── IcoALower.ico │ │ ├── IcoAUpper.ico │ │ ├── IcoAll.ico │ │ ├── IcoArrowDownSmall.ico │ │ ├── IcoArrowLeft.ico │ │ ├── IcoArrowLeftSmall.ico │ │ ├── IcoArrowLeftSmallInverse.ico │ │ ├── IcoArrowRight.ico │ │ ├── IcoArrowRightSmall.ico │ │ ├── IcoArrowRightSmallInverse.ico │ │ ├── IcoArrows.ico │ │ ├── IcoAscending.ico │ │ ├── IcoCSharp.ico │ │ ├── IcoCheckAll.ico │ │ ├── IcoClose.ico │ │ ├── IcoCode.ico │ │ ├── IcoCodeNew.ico │ │ ├── IcoCodeOpen.ico │ │ ├── IcoCodeSolution.ico │ │ ├── IcoCollapseAll.ico │ │ ├── IcoCommentAdd.ico │ │ ├── IcoCommentRemove.ico │ │ ├── IcoCompiled.ico │ │ ├── IcoCopy.ico │ │ ├── IcoCrLf.ico │ │ ├── IcoCultureInvariant.ico │ │ ├── IcoCurrent.ico │ │ ├── IcoCut.ico │ │ ├── IcoDelete.ico │ │ ├── IcoDescending.ico │ │ ├── IcoDescription.ico │ │ ├── IcoECMAScript.ico │ │ ├── IcoExit.ico │ │ ├── IcoExpandAll.ico │ │ ├── IcoExplicitCapture.ico │ │ ├── IcoExport.ico │ │ ├── IcoExportImport.ico │ │ ├── IcoExtension.ico │ │ ├── IcoFile.ico │ │ ├── IcoFileName.ico │ │ ├── IcoFileNameWithoutExtension.ico │ │ ├── IcoFindFirst.ico │ │ ├── IcoFindLast.ico │ │ ├── IcoFindNext.ico │ │ ├── IcoFindPrevious.ico │ │ ├── IcoFolder.ico │ │ ├── IcoGoToCursor.ico │ │ ├── IcoGroupLayout.ico │ │ ├── IcoHelp.ico │ │ ├── IcoHighlightAll.ico │ │ ├── IcoIgnoreCase.ico │ │ ├── IcoIgnorePatternWhitespace.ico │ │ ├── IcoImport.ico │ │ ├── IcoIndentQuotes.ico │ │ ├── IcoInfo.ico │ │ ├── IcoLayout.ico │ │ ├── IcoLetterASmall.ico │ │ ├── IcoLf.ico │ │ ├── IcoLimit.ico │ │ ├── IcoM.ico │ │ ├── IcoMediaPause.ico │ │ ├── IcoMediaPlay.ico │ │ ├── IcoMediaStop.ico │ │ ├── IcoMultiline.ico │ │ ├── IcoMultilineLiteral.ico │ │ ├── IcoNewItem.ico │ │ ├── IcoNewProjectWithFileInput.ico │ │ ├── IcoNewProjectWithInput.ico │ │ ├── IcoOpen.ico │ │ ├── IcoOpenLink.ico │ │ ├── IcoPaintRoller.ico │ │ ├── IcoPaste.ico │ │ ├── IcoPrint.ico │ │ ├── IcoR.ico │ │ ├── IcoRectangleSmall.ico │ │ ├── IcoReload.ico │ │ ├── IcoRename.ico │ │ ├── IcoRightToLeft.ico │ │ ├── IcoS.ico │ │ ├── IcoSave.ico │ │ ├── IcoSaveAll.ico │ │ ├── IcoSearch.ico │ │ ├── IcoSelection.ico │ │ ├── IcoSettings.ico │ │ ├── IcoSingleline.ico │ │ ├── IcoSnippet.ico │ │ ├── IcoSnippetExtensible.ico │ │ ├── IcoSortAlphabetically.ico │ │ ├── IcoSpaceSymbol.ico │ │ ├── IcoTilde.ico │ │ ├── IcoTree.ico │ │ ├── IcoUncheckAll.ico │ │ ├── IcoUndoEnabled.ico │ │ ├── IcoValueLayout.ico │ │ ├── IcoVisualBasic.ico │ │ ├── IcoWidth.ico │ │ ├── IcoWordWrap.ico │ │ ├── Latin1SupplementCharacters.txt │ │ ├── PngRegexator.png │ │ ├── Regexator.ico │ │ ├── RtfEula.txt │ │ ├── XmlFormatGroups.txt │ │ ├── XmlFormatInfos.txt │ │ ├── XmlGeneralCategories.xml │ │ ├── XmlGuideItems.txt │ │ ├── XmlNamedBlocks.xml │ │ └── XmlRegexCategoryInfos.txt │ ├── SnippetDirectory.vb │ ├── SnippetInitializer.vb │ ├── SnippetManager.vb │ ├── SnippetToolStripItemFactory.vb │ ├── Snippets │ │ ├── AlternationConstructs │ │ │ ├── DisallowGroup.rgxs │ │ │ ├── If.rgxs │ │ │ ├── Or.rgxs │ │ │ └── RequireGroup.rgxs │ │ ├── Anchors │ │ │ ├── Assert.rgxs │ │ │ ├── AssertBack.rgxs │ │ │ ├── Contiguous.rgxs │ │ │ ├── EndOfLine.rgxs │ │ │ ├── EndOfLineInvariant.rgxs │ │ │ ├── EndOfLineOrBeforeCarriageReturn.rgxs │ │ │ ├── EndOfString.rgxs │ │ │ ├── EndOfStringOrBeforeEndingLinefeed.rgxs │ │ │ ├── EntireInput.rgxs │ │ │ ├── EntireLine.rgxs │ │ │ ├── NotAssert.rgxs │ │ │ ├── NotAssertBack.rgxs │ │ │ ├── StartOfLine.rgxs │ │ │ ├── StartOfLineInvariant.rgxs │ │ │ ├── StartOfString.rgxs │ │ │ └── WordBoundary.rgxs │ │ ├── BackreferenceConstructs │ │ │ ├── NamedBackreference.rgxs │ │ │ └── NamedBackreferenceQuotes.rgxs │ │ ├── CharacterClasses │ │ │ ├── Alphanumeric.rgxs │ │ │ ├── AlphanumericLower.rgxs │ │ │ ├── AlphanumericUpper.rgxs │ │ │ ├── AnyInvariant.rgxs │ │ │ ├── AnyMaybeManyLazy.rgxs │ │ │ ├── ArabicDigit.rgxs │ │ │ ├── CharacterGroup.rgxs │ │ │ ├── CharacterGroupRange.rgxs │ │ │ ├── CharacterSubtraction.rgxs │ │ │ ├── Digit.rgxs │ │ │ ├── HexadecimalDigit.rgxs │ │ │ ├── LatinLetter.rgxs │ │ │ ├── NewLineChar.rgxs │ │ │ ├── UnicodeCategoryOrBlock.rgxs │ │ │ ├── WhiteSpaceCharacter.rgxs │ │ │ ├── WhiteSpaceExceptNewLine.rgxs │ │ │ └── WordCharacter.rgxs │ │ ├── CharacterEscapes │ │ │ ├── ASCIIChar.rgxs │ │ │ ├── ASCIIControlChar.rgxs │ │ │ ├── Backspace.rgxs │ │ │ ├── Bell.rgxs │ │ │ ├── CarriageReturn.rgxs │ │ │ ├── Escape.rgxs │ │ │ ├── FormFeed.rgxs │ │ │ ├── Linefeed.rgxs │ │ │ ├── NewLine.rgxs │ │ │ ├── Tab.rgxs │ │ │ ├── UTF16Char.rgxs │ │ │ └── VerticalTab.rgxs │ │ ├── GroupingConstructs │ │ │ ├── BalancingGroup.rgxs │ │ │ ├── BalancingGroupQuotes.rgxs │ │ │ ├── CapturingGroup.rgxs │ │ │ ├── GroupOptions.rgxs │ │ │ ├── NamedGroup.rgxs │ │ │ ├── NamedGroupQuotes.rgxs │ │ │ ├── NonbacktrackingGroup.rgxs │ │ │ └── NoncapturingGroup.rgxs │ │ ├── Miscellaneous │ │ │ ├── AngleBrackets.rgxs │ │ │ ├── CurlyBrackets.rgxs │ │ │ ├── InlineComment.rgxs │ │ │ ├── InlineOptions.rgxs │ │ │ ├── RoundBracketsEscaped.rgxs │ │ │ ├── SquareBrackets.rgxs │ │ │ └── Word.rgxs │ │ ├── Quantifiers │ │ │ ├── Count.rgxs │ │ │ ├── Maybe.rgxs │ │ │ ├── MaybeMany.rgxs │ │ │ └── OneMany.rgxs │ │ └── Substitutions │ │ │ ├── SubstituteDollar.rgxs │ │ │ ├── SubstituteEntireInputString.rgxs │ │ │ ├── SubstituteEntireMatch.rgxs │ │ │ ├── SubstituteLastCapturedGroup.rgxs │ │ │ ├── SubstituteNamedGroup.rgxs │ │ │ ├── SubstituteTextAfterMatch.rgxs │ │ │ └── SubstituteTextBeforeMatch.rgxs │ ├── SubstitutionSnippetSorter.vb │ ├── SummaryCreator.vb │ ├── Switcher.vb │ ├── ToolStripItemFactory.vb │ └── app.config └── global.ruleset └── tools └── build.cmd /README.md: -------------------------------------------------------------------------------- 1 | # Regexator 2 | 3 | Regexator is a development environment for .NET regular expressions 4 | 5 | ## Requirements 6 | 7 | * .NET Framework 4 Client Profile 8 | 9 | ## Installation 10 | 11 | * Download latest [release](https://github.com/josefpihrt/regexator/releases/latest), unzip and run Regexator.exe 12 | -------------------------------------------------------------------------------- /docs/user_guide.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/docs/user_guide.docx -------------------------------------------------------------------------------- /images/IcoFile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/images/IcoFile.ico -------------------------------------------------------------------------------- /images/IcoInput.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/images/IcoInput.ico -------------------------------------------------------------------------------- /images/main_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/images/main_window.png -------------------------------------------------------------------------------- /images/main_window_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/images/main_window_vertical.png -------------------------------------------------------------------------------- /images/main_window_vertical_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/images/main_window_vertical_desc.png -------------------------------------------------------------------------------- /images/regexator.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/images/regexator.ico -------------------------------------------------------------------------------- /images/regexator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/images/regexator.png -------------------------------------------------------------------------------- /src/Regexator.Core/ClipboardMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator 4 | { 5 | public enum ClipboardMode 6 | { 7 | Cut, 8 | Copy 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Regexator.Core/Collections/Generic/ICollectionExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace Regexator.Collections.Generic 7 | { 8 | public static class ICollectionExtensions 9 | { 10 | public static void AddItems(this ICollection collection, IEnumerable items) 11 | { 12 | if (collection == null) 13 | throw new ArgumentNullException(nameof(collection)); 14 | 15 | if (items == null) 16 | throw new ArgumentNullException(nameof(items)); 17 | 18 | foreach (TSource item in items) 19 | collection.Add(item); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Regexator.Core/Command.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator 6 | { 7 | public class Command : ICommand 8 | { 9 | public Command(Action action) 10 | : this(action, "") 11 | { 12 | } 13 | 14 | public Command(Action action, string name) 15 | { 16 | _action = action ?? throw new ArgumentNullException(nameof(action)); 17 | Name = name ?? ""; 18 | } 19 | 20 | public void Execute() 21 | { 22 | _action(); 23 | } 24 | 25 | public override string ToString() 26 | { 27 | return Name; 28 | } 29 | 30 | public string Name { get; } 31 | 32 | private readonly Action _action; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Regexator.Core/ContainerProps.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator 6 | { 7 | [Flags] 8 | public enum ContainerProps 9 | { 10 | None = 0, 11 | Attributes = 1, 12 | Mode = 2, 13 | Title = 4, 14 | Author = 8, 15 | Description = 16, 16 | Version = 32, 17 | HelpUrl = 64, 18 | Keywords = 128, 19 | PatternText = 256, 20 | RegexOptions = 512, 21 | PatternOptions = 1024, 22 | PatternCurrentLine = 2048, 23 | ReplacementText = 4096, 24 | ReplacementOptions = 8192, 25 | ReplacementNewLine = 16384, 26 | ReplacementCurrentLine = 32768, 27 | IgnoredGroups = 65536, 28 | OutputOptions = 131072, 29 | FileSystemSearchMode = 262144, 30 | FileSystemSearchOption = 524288, 31 | FileSystemFileNamePart = 1048576 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Regexator.Core/Drawing/ColorSortMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Drawing 4 | { 5 | public enum ColorSortMode 6 | { 7 | Hue, 8 | Brightness, 9 | Name 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Regexator.Core/Drawing/NameColorSorter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Drawing; 6 | 7 | namespace Regexator.Drawing 8 | { 9 | public sealed class NameColorSorter : IComparer 10 | { 11 | public int Compare(Color x, Color y) 12 | { 13 | return string.Compare(x.Name, y.Name, StringComparison.OrdinalIgnoreCase); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Regexator.Core/Enums.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator 4 | { 5 | public enum EvaluationMode 6 | { 7 | Match, 8 | Split, 9 | Replace 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/Regexator.Core/Extensions/EnumExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.ComponentModel; 5 | using System.Reflection; 6 | 7 | namespace Regexator 8 | { 9 | public static class EnumExtensions 10 | { 11 | public static string GetDescription(this Enum value) 12 | { 13 | if (value == null) 14 | throw new ArgumentNullException(nameof(value)); 15 | 16 | Type type = value.GetType(); 17 | string name = Enum.GetName(type, value); 18 | if (name != null) 19 | { 20 | FieldInfo info = type.GetField(name); 21 | if (info != null 22 | && Attribute.GetCustomAttribute(info, typeof(DescriptionAttribute)) is DescriptionAttribute attr) 23 | { 24 | return attr.Description; 25 | } 26 | } 27 | 28 | return null; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Regexator.Core/Extensions/Extensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator 4 | { 5 | public static class Extensions 6 | { 7 | public static int GetDigitCount(this int value) 8 | { 9 | if (value < 0) 10 | value = -value; 11 | 12 | if (value < 10) 13 | return 1; 14 | 15 | if (value < 100) 16 | return 2; 17 | 18 | if (value < 1000) 19 | return 3; 20 | 21 | if (value < 10000) 22 | return 4; 23 | 24 | if (value < 100000) 25 | return 5; 26 | 27 | if (value < 1000000) 28 | return 6; 29 | 30 | if (value < 10000000) 31 | return 7; 32 | 33 | if (value < 100000000) 34 | return 8; 35 | 36 | if (value < 1000000000) 37 | return 9; 38 | 39 | return 10; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/DragItem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Windows.Forms; 4 | 5 | namespace Regexator.FileSystem 6 | { 7 | internal sealed class DragItem 8 | { 9 | private DragItem(TreeNode node, NodeKind kind) 10 | { 11 | Node = node; 12 | Kind = kind; 13 | } 14 | 15 | public static DragItem Create(ItemDragEventArgs e) 16 | { 17 | if (e.Item is FileSystemNode node 18 | && (node.Kind == NodeKind.Directory || node.Kind == NodeKind.Project || node.Kind == NodeKind.FileInput)) 19 | { 20 | return new DragItem(node, node.Kind); 21 | } 22 | 23 | if (e.Item is InputNode inputNode) 24 | return new DragItem(inputNode, NodeKind.Input); 25 | 26 | return null; 27 | } 28 | 29 | public TreeNode Node { get; } 30 | 31 | public NodeKind Kind { get; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/EnumUtility.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.FileSystem 4 | { 5 | public static class EnumUtility 6 | { 7 | public static string GetDescription(View value) 8 | { 9 | switch (value) 10 | { 11 | case View.Solution: 12 | return Resources.Solution; 13 | case View.FileSystem: 14 | return Resources.FileSystem; 15 | default: 16 | return ""; 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/Enums.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.FileSystem 4 | { 5 | public enum NodeKind 6 | { 7 | Root, 8 | Directory, 9 | Project, 10 | Input, 11 | FileInput 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/Exceptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator.FileSystem 6 | { 7 | [Flags] 8 | public enum Exceptions 9 | { 10 | None = 0, 11 | Argument = 1, 12 | IO = 2, 13 | UnauthorizedAccess = 4, 14 | Security = 8, 15 | NotSupported = 16, 16 | InvalidOperation = 32, 17 | XmlException = 64 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/FileSystemSearchSettings.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.IO; 4 | using Regexator.IO; 5 | 6 | namespace Regexator.FileSystem 7 | { 8 | //TODO: FileSystemSearchSettings 9 | public class FileSystemSearchSettings 10 | { 11 | public SearchMode SearchMode { get; set; } 12 | public SearchOption SearchOption { get; set; } 13 | public FileNamePart FileNamePart { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/IClipboardNode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Windows.Forms; 4 | 5 | namespace Regexator.FileSystem 6 | { 7 | internal interface IClipboardNode 8 | { 9 | void Paste(FileSystemManager manager, ClipboardMode mode); 10 | bool CanCut(); 11 | bool CanCopy(); 12 | bool CanBePasted(TreeNode target, ClipboardMode mode); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/IInputContainer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.FileSystem 4 | { 5 | public interface IInputContainer 6 | { 7 | Input Input { get; set; } 8 | ProjectNode ProjectNode { get; } 9 | string FullName { get; } 10 | string FileName { get; } 11 | NodeImageIndex NodeImageIndex { get; } 12 | NodeImageIndex OpenNodeImageIndex { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/INode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Diagnostics.CodeAnalysis; 4 | 5 | namespace Regexator.FileSystem 6 | { 7 | public interface INode 8 | { 9 | [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] 10 | RootNode GetRootNode(); 11 | 12 | string RootPath { get; } 13 | NodeKind Kind { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/InvalidNode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Diagnostics.CodeAnalysis; 5 | using System.Windows.Forms; 6 | 7 | namespace Regexator.FileSystem 8 | { 9 | [SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable")] 10 | public abstract class InvalidNode : TreeNode 11 | { 12 | protected InvalidNode(string path) 13 | { 14 | Path = path ?? throw new ArgumentNullException(nameof(path)); 15 | } 16 | 17 | public abstract FileSystemNode CreateNode(); 18 | 19 | public string Path { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/ItemKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.FileSystem 4 | { 5 | public enum ItemKind 6 | { 7 | Directory, 8 | Project 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/NodeImageIndex.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.FileSystem 4 | { 5 | public enum NodeImageIndex 6 | { 7 | Directory, 8 | DirectoryOpen, 9 | Project, 10 | ProjectOpen, 11 | ProjectError, 12 | FileInput, 13 | FileInputOpen, 14 | FileInputError, 15 | Input, 16 | InputOpen 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/OpenMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.FileSystem 4 | { 5 | public enum OpenMode 6 | { 7 | None, 8 | InputOnly 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/RecentDirectory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.IO; 4 | 5 | namespace Regexator.FileSystem 6 | { 7 | public sealed class RecentDirectory : RecentItem 8 | { 9 | public RecentDirectory(DirectoryInfo info) 10 | : base(info) 11 | { 12 | } 13 | 14 | public override ItemKind Kind 15 | { 16 | get { return ItemKind.Directory; } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/RecentProject.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.IO; 4 | 5 | namespace Regexator.FileSystem 6 | { 7 | public sealed class RecentProject : RecentItem 8 | { 9 | public RecentProject(FileInfo info) 10 | : base(info) 11 | { 12 | _info = info; 13 | } 14 | 15 | public override string Text 16 | { 17 | get { return Path.Combine(_info.DirectoryName, Path.GetFileNameWithoutExtension(_info.Name)); } 18 | } 19 | 20 | public override ItemKind Kind 21 | { 22 | get { return ItemKind.Project; } 23 | } 24 | 25 | private readonly FileInfo _info; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/SaveEventArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator.FileSystem 6 | { 7 | public class SaveEventArgs : EventArgs 8 | { 9 | public SaveEventArgs(SaveMode mode, bool confirm) 10 | { 11 | Mode = mode; 12 | Confirm = confirm; 13 | } 14 | 15 | public ProjectContainer Container { get; set; } 16 | public Input Input { get; set; } 17 | 18 | public SaveMode Mode { get; } 19 | 20 | public bool Confirm { get; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/SaveMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.FileSystem 4 | { 5 | public enum SaveMode 6 | { 7 | All, 8 | Project, 9 | Input, 10 | InputText, 11 | Pattern, 12 | Replacement, 13 | ProjectInfo 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/SuffixGenerator.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Globalization; 4 | 5 | namespace Regexator.FileSystem 6 | { 7 | public class SuffixGenerator 8 | { 9 | public SuffixGenerator() 10 | { 11 | _count = 1; 12 | } 13 | 14 | public void Increment() 15 | { 16 | _count++; 17 | } 18 | 19 | public virtual string Suffix 20 | { 21 | get 22 | { 23 | if (_count > 1) 24 | return " (" + _count.ToString(CultureInfo.CurrentCulture) + ")"; 25 | 26 | return ""; 27 | } 28 | } 29 | 30 | private int _count; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Regexator.Core/FileSystem/View.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.FileSystem 4 | { 5 | public enum View 6 | { 7 | Solution, 8 | FileSystem 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Regexator.Core/GroupSettingsHelper.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using Regexator.Text.RegularExpressions; 4 | using Regexator.Collections.Generic; 5 | 6 | namespace Regexator.Output 7 | { 8 | public static class GroupSettingsHelper 9 | { 10 | public static ContainerProps GetChangedProps(GroupSettings first, GroupSettings second, ContainerProps props) 11 | { 12 | if (first == null || second == null || ReferenceEquals(first, second)) 13 | return ContainerProps.None; 14 | 15 | var value = ContainerProps.None; 16 | 17 | if (props.Contains(ContainerProps.IgnoredGroups) 18 | && !first.IgnoredGroups.SequenceEqualUnordered(second.IgnoredGroups)) 19 | { 20 | value |= ContainerProps.IgnoredGroups; 21 | } 22 | 23 | return value; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Regexator.Core/GuideItem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Diagnostics; 5 | using Regexator.Text; 6 | 7 | namespace Regexator 8 | { 9 | [DebuggerDisplay("{Text}")] 10 | public class GuideItem 11 | { 12 | private string _categoryText; 13 | 14 | public GuideItem(string text, RegexCategory category, string description) 15 | { 16 | Text = text ?? throw new ArgumentNullException(nameof(text)); 17 | Category = category; 18 | Description = description ?? ""; 19 | } 20 | 21 | public string Text { get; } 22 | 23 | public RegexCategory Category { get; } 24 | 25 | public string Description { get; } 26 | 27 | public string CategoryText 28 | { 29 | get { return _categoryText ?? (_categoryText = TextUtility.SplitCamelCase(Category)); } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/Regexator.Core/GuideSearchManager.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator 6 | { 7 | public class GuideSearchManager : SearchManagerBase 8 | { 9 | public GuideSearchManager(GuideItem[] items) 10 | : base(items) 11 | { 12 | } 13 | 14 | public override bool Predicate(GuideItem item) 15 | { 16 | if (item == null) 17 | throw new ArgumentNullException(nameof(item)); 18 | 19 | return IsFilterValueEmpty 20 | || item.Text.IndexOf(FilterValue, Comparison) != -1 21 | || (SearchInDescription && item.Description.IndexOf(FilterValue, Comparison) != -1); 22 | } 23 | 24 | public bool SearchInDescription { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Regexator.Core/ICommand.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator 4 | { 5 | public interface ICommand 6 | { 7 | void Execute(); 8 | 9 | string Name { get; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Regexator.Core/IO/FileNamePart.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.IO 4 | { 5 | public enum FileNamePart 6 | { 7 | NameAndExtension, 8 | NameWithoutExtension, 9 | Extension 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Regexator.Core/IO/FileSystemEntry.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.IO 4 | { 5 | public enum FileSystemEntry 6 | { 7 | File, 8 | Directory 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Regexator.Core/IO/SearchMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.IO 4 | { 5 | public enum SearchMode 6 | { 7 | FileName, 8 | FileContent, 9 | DirectoryName 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Regexator.Core/IO/SearchResultEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Globalization; 6 | 7 | namespace Regexator.IO 8 | { 9 | public sealed class SearchResultEqualityComparer : EqualityComparer 10 | { 11 | public override bool Equals(SearchResult x, SearchResult y) 12 | { 13 | if (ReferenceEquals(x, y)) 14 | return true; 15 | 16 | if (x == null || y == null) 17 | return false; 18 | 19 | return string.Equals(x.FullName, y.FullName, StringComparison.OrdinalIgnoreCase); 20 | } 21 | 22 | public override int GetHashCode(SearchResult obj) 23 | { 24 | if (obj == null || obj.FullName == null) 25 | return 0; 26 | 27 | return obj.FullName.ToUpper(CultureInfo.InvariantCulture).GetHashCode(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Regexator.Core/IO/SearchResultState.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.IO 4 | { 5 | public enum SearchResultState 6 | { 7 | None, 8 | Renamed, 9 | Deleted, 10 | Error 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Regexator.Core/IndexSearcherResult.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator 4 | { 5 | public class IndexSearcherResult 6 | { 7 | internal IndexSearcherResult(T current, T previous, T next) 8 | { 9 | Current = current; 10 | Previous = previous; 11 | Next = next; 12 | } 13 | 14 | public T Current { get; } 15 | 16 | public T Previous { get; } 17 | 18 | public T Next { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Regexator.Core/InputCollection.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Collections.ObjectModel; 6 | 7 | namespace Regexator 8 | { 9 | [Serializable] 10 | public class InputCollection : Collection 11 | { 12 | public InputCollection() 13 | { 14 | } 15 | 16 | public InputCollection(IList list) 17 | : base(list) 18 | { 19 | } 20 | 21 | public void AddRange(IEnumerable items) 22 | { 23 | if (items == null) 24 | throw new ArgumentNullException(nameof(items)); 25 | 26 | foreach (Input item in items) 27 | Add(item); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Regexator.Core/InputKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator 4 | { 5 | public enum InputKind 6 | { 7 | None, 8 | File, 9 | Included 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Regexator.Core/InputOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.ComponentModel; 5 | 6 | namespace Regexator 7 | { 8 | [Flags] 9 | public enum InputOptions 10 | { 11 | None = 0, 12 | CurrentLineIncludesNewLine = 1, 13 | CurrentLineOnly = 2, 14 | Highlight = 4, 15 | #if !DEBUG 16 | [Browsable(false)] 17 | #endif 18 | ReplacementSync = 8, 19 | 20 | [Browsable(false)] 21 | TextContainsCDataEnd = 16, 22 | 23 | [Browsable(false)] 24 | WordWrap = 32 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Regexator.Core/InputProps.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator 6 | { 7 | [Flags] 8 | public enum InputProps 9 | { 10 | None = 0, 11 | Name = 1, 12 | Options = 2, 13 | Text = 4, 14 | NewLine = 8, 15 | CurrentLine = 16, 16 | Encoding = 32, 17 | Attributes = 64 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Regexator.Core/Int32BinarySearcher.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | 5 | namespace Regexator 6 | { 7 | public class Int32BinarySearcher : BinarySearcher 8 | { 9 | public Int32BinarySearcher() 10 | { 11 | } 12 | 13 | public Int32BinarySearcher(IEnumerable items) 14 | : base(items) 15 | { 16 | } 17 | 18 | protected override int DefaultValue 19 | { 20 | get { return -1; } 21 | } 22 | 23 | public static readonly Int32BinarySearcher Empty = new Int32BinarySearcher(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Regexator.Core/ItemAttributes.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator 6 | { 7 | [Flags] 8 | public enum ItemAttributes 9 | { 10 | None = 0, 11 | ReadOnly = 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Regexator.Core/KeyStates.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator 6 | { 7 | [Flags] 8 | public enum KeyStates 9 | { 10 | None = 0, 11 | Down = 1, 12 | Toggled = 2 13 | } 14 | } -------------------------------------------------------------------------------- /src/Regexator.Core/LocalizedDisplayNameAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.ComponentModel; 5 | 6 | namespace Regexator 7 | { 8 | internal sealed class LocalizedDisplayNameAttribute : DisplayNameAttribute 9 | { 10 | public LocalizedDisplayNameAttribute(string resourceName) 11 | { 12 | ResourceName = resourceName ?? throw new ArgumentNullException(nameof(resourceName)); 13 | } 14 | 15 | public override string DisplayName 16 | { 17 | get { return Resources.ResourceManager.GetString(ResourceName); } 18 | } 19 | 20 | public string ResourceName { get; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Regexator.Core/MessageResult.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator 4 | { 5 | public enum MessageResult 6 | { 7 | Cancel, 8 | Yes, 9 | YesToAll, 10 | No, 11 | NoToAll 12 | } 13 | } -------------------------------------------------------------------------------- /src/Regexator.Core/NewItemCommand.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Drawing; 5 | 6 | namespace Regexator 7 | { 8 | public class NewItemCommand : ICommand 9 | { 10 | public NewItemCommand(string name, Action action) 11 | : this(name, action, null) 12 | { 13 | } 14 | 15 | public NewItemCommand(string name, Action action, Icon icon) 16 | { 17 | Name = name ?? throw new ArgumentNullException(nameof(name)); 18 | _action = action ?? throw new ArgumentNullException(nameof(action)); 19 | Icon = icon; 20 | } 21 | 22 | public void Execute() 23 | { 24 | _action(); 25 | } 26 | 27 | public string Name { get; } 28 | 29 | public Icon Icon { get; } 30 | 31 | private readonly Action _action; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Regexator.Core/Output/CaptureInfoSelections.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | using Regexator.Text; 5 | 6 | namespace Regexator.Output 7 | { 8 | public class CaptureInfoSelections : InfoSelections 9 | { 10 | internal CaptureInfoSelections( 11 | TextSpan match, 12 | TextSpan group, 13 | TextSpan capture, 14 | TextSpan index, 15 | TextSpan length) 16 | : base(match, index, length) 17 | { 18 | Group = group; 19 | Capture = capture; 20 | } 21 | 22 | public override IEnumerable EnumerateItems() 23 | { 24 | yield return Match; 25 | yield return Group; 26 | yield return Capture; 27 | yield return Index; 28 | yield return Length; 29 | } 30 | 31 | public TextSpan Group { get; } 32 | public TextSpan Capture { get; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Regexator.Core/Output/Enums.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Output 4 | { 5 | public enum RegexBlockKind 6 | { 7 | Capture, 8 | Replace, 9 | Split, 10 | SplitGroup 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Regexator.Core/Output/InfoSelections.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | using Regexator.Text; 5 | 6 | namespace Regexator.Output 7 | { 8 | public class InfoSelections 9 | { 10 | internal InfoSelections( 11 | TextSpan match, 12 | TextSpan index, 13 | TextSpan length) 14 | { 15 | Match = match; 16 | Index = index; 17 | Length = length; 18 | } 19 | 20 | public virtual IEnumerable EnumerateItems() 21 | { 22 | yield return Match; 23 | yield return Index; 24 | yield return Length; 25 | } 26 | 27 | public TextSpan Match { get; } 28 | public TextSpan Index { get; } 29 | public TextSpan Length { get; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Regexator.Core/Output/OutputFormatter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Globalization; 4 | 5 | namespace Regexator.Output 6 | { 7 | internal static class OutputFormatter 8 | { 9 | public static string PadNumber(int value, int totalWidth, TextAlignment alignment) 10 | { 11 | return (alignment == TextAlignment.Left) 12 | ? value.ToString(CultureInfo.CurrentCulture).PadRight(totalWidth) 13 | : value.ToString(CultureInfo.CurrentCulture).PadLeft(totalWidth); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Regexator.Core/Output/TextAlignment.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Output 4 | { 5 | public enum TextAlignment 6 | { 7 | Left, 8 | Right 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Regexator.Core/OutputOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator 6 | { 7 | [Flags] 8 | public enum OutputOptions 9 | { 10 | None = 0, 11 | Highlight = 1, 12 | Info = 2, 13 | CarriageReturnSymbol = 4, 14 | LinefeedSymbol = 8, 15 | TabSymbol = 16, 16 | NoCaptureSymbol = 32, 17 | WrapText = 64, 18 | SpaceSymbol = 128 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Regexator.Core/PatternOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.ComponentModel; 5 | 6 | namespace Regexator 7 | { 8 | [Flags] 9 | public enum PatternOptions 10 | { 11 | None = 0, 12 | CurrentLineOnly = 1, 13 | #if !DEBUG 14 | [Browsable(false)] 15 | #endif 16 | InputSync = 2, 17 | #if !DEBUG 18 | [Browsable(false)] 19 | #endif 20 | ReplacementSync = 4, 21 | 22 | [Browsable(false)] 23 | TextContainsCDataEnd = 8, 24 | 25 | [Browsable(false)] 26 | WordWrap = 16 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Regexator.Core/RedrawDisabler.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Windows.Forms; 5 | using Regexator.Windows.Forms; 6 | 7 | namespace Regexator 8 | { 9 | public sealed class RedrawDisabler : IDisposable 10 | { 11 | private bool _disposed; 12 | private readonly Control _control; 13 | 14 | public RedrawDisabler(Control control) 15 | { 16 | _control = control ?? throw new ArgumentNullException(nameof(control)); 17 | _control.BeginUpdate(); 18 | } 19 | 20 | public void Dispose() 21 | { 22 | Dispose(true); 23 | GC.SuppressFinalize(this); 24 | } 25 | 26 | private void Dispose(bool disposing) 27 | { 28 | if (!_disposed) 29 | { 30 | if (disposing) 31 | _control.EndUpdate(); 32 | 33 | _disposed = true; 34 | } 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/Regexator.Core/RegexCategory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator 4 | { 5 | public enum RegexCategory 6 | { 7 | None, 8 | AlternationConstructs, 9 | Anchors, 10 | BackreferenceConstructs, 11 | GeneralCategories, 12 | GroupingConstructs, 13 | CharacterClasses, 14 | CharacterEscapes, 15 | Miscellaneous, 16 | NamedBlocks, 17 | Quantifiers, 18 | Options, 19 | Substitutions, 20 | BasicLatin, 21 | Latin1Supplement, 22 | Custom 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Regexator.Core/RegexCategoryInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator 6 | { 7 | public class RegexCategoryInfo 8 | { 9 | public RegexCategoryInfo(RegexCategory category, Uri url) 10 | { 11 | Category = category; 12 | Url = url; 13 | } 14 | 15 | public RegexCategory Category { get; } 16 | public Uri Url { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Regexator.Core/ReplacementOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.ComponentModel; 5 | 6 | namespace Regexator 7 | { 8 | [Flags] 9 | public enum ReplacementOptions 10 | { 11 | None = 0, 12 | CurrentLineIncludesNewLine = 1, 13 | CurrentLineOnly = 2, 14 | 15 | [Browsable(false)] 16 | TextContainsCDataEnd = 4, 17 | 18 | [Browsable(false)] 19 | WordWrap = 8, 20 | #if !DEBUG 21 | [Browsable(false)] 22 | #endif 23 | ToUpper = 16, 24 | #if !DEBUG 25 | [Browsable(false)] 26 | #endif 27 | ToLower = 32 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoArrowLeft.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoArrowLeft.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoArrowRight.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoArrowRight.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoArrowRightSmall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoArrowRightSmall.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCheckAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCheckAll.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoChecked.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoChecked.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCheckedAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCheckedAll.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCheckedNone.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCheckedNone.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCheckedNot.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCheckedNot.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoClose.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoClose.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCode.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCode.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCodeError.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCodeError.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCodeNew.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCodeNew.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCodeOpen.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCodeOpen.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCodeSelected.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCodeSelected.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCodeSolution.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCodeSolution.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCollapseAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCollapseAll.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCopy.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCopy.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCultureInvariant.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCultureInvariant.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoCut.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoCut.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoDelete.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoDelete.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoECMAScript.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoECMAScript.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoExpandAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoExpandAll.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoFile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoFile.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoFileError.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoFileError.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoFileNew.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoFileNew.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoFilePlus.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoFilePlus.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoFileSelected.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoFileSelected.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoFolder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoFolder.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoFolderOpen.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoFolderOpen.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoHeart.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoHeart.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoIgnoreCase.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoIgnoreCase.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoInfo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoInfo.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoInput.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoInput.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoInputNew.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoInputNew.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoInputSelected.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoInputSelected.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoInsertSnippet.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoInsertSnippet.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoInsertSnippet2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoInsertSnippet2.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoMatchCase.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoMatchCase.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoMatchWhole.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoMatchWhole.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoNewFolder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoNewFolder.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoNewItem.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoNewItem.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoNewProjectWithFileInput.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoNewProjectWithFileInput.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoNewProjectWithInput.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoNewProjectWithInput.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoOpen.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoOpen.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoPaste.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoPaste.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoReload.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoReload.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoRename.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoRename.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoReplace.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoReplace.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoReplaceAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoReplaceAll.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoSnippet.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoSnippet.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoSnippetExtensible.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoSnippetExtensible.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoSquareBrackets.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoSquareBrackets.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/IcoUncheckAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/IcoUncheckAll.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/Regexator.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/Regexator.ico -------------------------------------------------------------------------------- /src/Regexator.Core/Resources/XmlRegexOptionsItems.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator.Core/Resources/XmlRegexOptionsItems.txt -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/Enums.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Snippets 4 | { 5 | public static class EnumExtensions 6 | { 7 | public static string GetDescription(this SnippetCodeKind value) 8 | { 9 | switch (value) 10 | { 11 | case SnippetCodeKind.None: 12 | return Resources.Default; 13 | case SnippetCodeKind.Format: 14 | return Resources.Format; 15 | case SnippetCodeKind.Negative: 16 | return Resources.Negative; 17 | default: 18 | return value.ToString(); 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/ExtendedSnippetInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Text.RegularExpressions; 5 | 6 | namespace Regexator.Snippets 7 | { 8 | public class ExtendedSnippetInfo 9 | { 10 | public ExtendedSnippetInfo(string code, RegexOptions options, SnippetCodeKind kind) 11 | { 12 | Code = code ?? throw new ArgumentNullException(nameof(code)); 13 | Options = options; 14 | Kind = kind; 15 | } 16 | 17 | public string Code { get; } 18 | 19 | public SnippetCodeKind Kind { get; } 20 | 21 | public RegexOptions Options { get; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/LiteralInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | 5 | namespace Regexator.Snippets 6 | { 7 | internal class LiteralInfo 8 | { 9 | public LiteralInfo(SnippetLiteral literal) 10 | : this(literal, literal.DefaultValue) 11 | { 12 | } 13 | 14 | public LiteralInfo(SnippetLiteral literal, string value) 15 | { 16 | Literal = literal; 17 | Value = value; 18 | Indexes = new List(); 19 | } 20 | 21 | public string Value { get; set; } 22 | public List Indexes { get; } 23 | public SnippetLiteral Literal { get; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/SenseDataGridView.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Windows.Forms; 5 | using Regexator.Windows.Forms; 6 | 7 | namespace Regexator.Snippets 8 | { 9 | public class SenseDataGridView : ExtendedDataGridView 10 | { 11 | protected override void OnSelectionChanged(EventArgs e) 12 | { 13 | if (SelectedRows.Count > 0) 14 | this.EnsureRowDisplayed(SelectedRows[0].Index); 15 | 16 | base.OnSelectionChanged(e); 17 | } 18 | 19 | protected override bool ProcessDataGridViewKey(KeyEventArgs e) 20 | { 21 | if (e == null) 22 | throw new ArgumentNullException(nameof(e)); 23 | 24 | if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab) 25 | return true; 26 | 27 | return base.ProcessDataGridViewKey(e); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/SenseTextBox.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Windows.Forms; 5 | 6 | namespace Regexator.Snippets 7 | { 8 | public class SenseTextBox : TextBox 9 | { 10 | protected override void OnKeyDown(KeyEventArgs e) 11 | { 12 | if (e == null) 13 | throw new ArgumentNullException(nameof(e)); 14 | 15 | if (e.Modifiers == Keys.Control) 16 | { 17 | if (e.KeyCode == Keys.Y || e.KeyCode == Keys.Z) 18 | e.Handled = true; 19 | } 20 | 21 | base.OnKeyDown(e); 22 | } 23 | 24 | protected override bool IsInputKey(Keys keyData) 25 | { 26 | if ((int)keyData == 9 || (int)keyData == 65545) // tab || shift+tab 27 | return true; 28 | 29 | return base.IsInputKey(keyData); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/SnippetCodeKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Snippets 4 | { 5 | public enum SnippetCodeKind 6 | { 7 | Escaped, 8 | Format, 9 | Lazy, 10 | Negative, 11 | None 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/SnippetCodeSenseItem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Snippets 4 | { 5 | public class SnippetCodeSenseItem : SnippetSenseItem 6 | { 7 | public SnippetCodeSenseItem(RegexSnippet snippet) 8 | : base(snippet) 9 | { 10 | } 11 | 12 | public override string Text 13 | { 14 | get { return Snippet.CleanCodeSingleline; } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/SnippetErrorInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using Regexator.FileSystem; 5 | 6 | namespace Regexator.Snippets 7 | { 8 | public class SnippetErrorInfo : FileErrorInfo 9 | { 10 | public SnippetErrorInfo(string path, Exception exception) 11 | : this(path, exception, null) 12 | { 13 | } 14 | 15 | public SnippetErrorInfo(string path, Exception exception, string fullName) 16 | : base(path, exception) 17 | { 18 | _snippetFullName = fullName; 19 | } 20 | 21 | public override string Comment 22 | { 23 | get { return _snippetFullName; } 24 | } 25 | 26 | private readonly string _snippetFullName; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/SnippetKinds.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator.Snippets 6 | { 7 | [Flags] 8 | public enum SnippetKinds 9 | { 10 | None = 0, 11 | Regular = 1, 12 | Surround = 2 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/SnippetOrigin.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Snippets 4 | { 5 | public enum SnippetOrigin 6 | { 7 | None, 8 | System, 9 | User 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/SnippetSearchManager.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator.Snippets 6 | { 7 | public class SnippetSearchManager : SearchManagerBase 8 | { 9 | public SnippetSearchManager(RegexSnippet[] items) 10 | : base(items) 11 | { 12 | } 13 | 14 | public override bool Predicate(RegexSnippet item) 15 | { 16 | if (item == null) 17 | throw new ArgumentNullException(nameof(item)); 18 | 19 | return IsFilterValueEmpty 20 | || item.CleanCode.IndexOf(FilterValue, Comparison) != -1 21 | || item.Title.IndexOf(FilterValue, Comparison) != -1 22 | || (SearchInDescription && item.Description.IndexOf(FilterValue, Comparison) != -1); 23 | } 24 | 25 | public bool SearchInDescription { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Regexator.Core/Snippets/SnippetTitleSenseItem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Snippets 4 | { 5 | public class SnippetTitleSenseItem : SnippetSenseItem 6 | { 7 | public SnippetTitleSenseItem(RegexSnippet snippet) 8 | : base(snippet) 9 | { 10 | } 11 | 12 | public override string Text 13 | { 14 | get { return Snippet.Title; } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/BracketKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | public enum BracketKind 6 | { 7 | Angle, 8 | Curly, 9 | Round, 10 | Square 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/CodeBuilderSettings.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | public class CodeBuilderSettings 6 | { 7 | public CodeBuilderSettings() 8 | { 9 | ConcatOperator = "+"; 10 | OmitNoneOptions = true; 11 | } 12 | 13 | public NewLineLiteral NewLineLiteral { get; set; } 14 | public ConcatOperatorPosition ConcatOperatorPosition { get; set; } 15 | public bool Verbatim { get; set; } 16 | public bool AddNamespace { get; set; } 17 | public bool NewLineOnParameters { get; set; } 18 | public bool OmitNoneOptions { get; set; } 19 | public bool Multiline { get; set; } 20 | 21 | public string ConcatOperator 22 | { 23 | get { return _concatOperator; } 24 | set { _concatOperator = value ?? ""; } 25 | } 26 | 27 | private string _concatOperator; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/ConcatOperatorPosition.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | public enum ConcatOperatorPosition 6 | { 7 | End, 8 | Start 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/ExportMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | public enum ExportMode 6 | { 7 | CSharp, 8 | CSharpVerbatim, 9 | VisualBasic 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/Extensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | public static class Extensions 6 | { 7 | public static string GetString(this NewLineMode mode) 8 | { 9 | switch (mode) 10 | { 11 | case NewLineMode.CrLf: 12 | return "\r\n"; 13 | case NewLineMode.Lf: 14 | return "\n"; 15 | default: 16 | return ""; 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/FindResult.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | public enum FindResult 6 | { 7 | Success, 8 | NoSuccess, 9 | Finished, 10 | NoSearchPhrase 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/FormattedValue.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using Regexator.Output; 4 | 5 | namespace Regexator.Text 6 | { 7 | public class FormattedValue 8 | { 9 | public FormattedValue(string value, OutputSettings settings) 10 | { 11 | Value = value; 12 | _settings = settings; 13 | } 14 | 15 | public override string ToString() 16 | { 17 | return _formattedValue ?? (_formattedValue = TextProcessor.ProcessSymbols(Value, _settings)); 18 | } 19 | 20 | public string Value { get; } 21 | 22 | private readonly OutputSettings _settings; 23 | private string _formattedValue; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/INewLineMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | public interface INewLineMode 6 | { 7 | void ToggleNewLine(); 8 | 9 | NewLineMode NewLineMode { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/ITextContainer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | public interface ITextContainer 6 | { 7 | string Text { get; set; } 8 | string SelectedText { get; set; } 9 | int SelectionStart { get; set; } 10 | int SelectionLength { get; set; } 11 | 12 | void SelectText(int start, int length); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/NewLineLiteral.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Diagnostics.CodeAnalysis; 4 | 5 | namespace Regexator.Text 6 | { 7 | public enum NewLineLiteral 8 | { 9 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Lf")] 10 | Lf, 11 | 12 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Cr")] 13 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Lf")] 14 | CrLf, 15 | 16 | Environment 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/NewLineMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Diagnostics.CodeAnalysis; 4 | 5 | namespace Regexator.Text 6 | { 7 | public enum NewLineMode 8 | { 9 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Cr")] 10 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Lf")] 11 | CrLf, 12 | 13 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Lf")] 14 | Lf 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/OutputSearchDefinition.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | using System.Windows.Forms; 5 | 6 | namespace Regexator.Text 7 | { 8 | public sealed class OutputSearchDefinition : SearchDefinition 9 | { 10 | public OutputSearchDefinition(TextBoxBase box, int length) 11 | : base(box) 12 | { 13 | Length = length; 14 | } 15 | 16 | public override IEnumerable FindAll() 17 | { 18 | foreach (SearchMatch result in base.FindAll()) 19 | { 20 | if (!result.IsContained(Length)) 21 | yield return result; 22 | } 23 | } 24 | 25 | public int Length { get; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/CaptureItemCollection.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | using System.Collections.ObjectModel; 5 | 6 | namespace Regexator.Text.RegularExpressions 7 | { 8 | public class CaptureItemCollection : ReadOnlyCollection 9 | { 10 | internal CaptureItemCollection(IList list) 11 | : base(list) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/CharEscapeMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text.RegularExpressions 4 | { 5 | public enum CharEscapeMode 6 | { 7 | None = 0, 8 | AsciiHexadecimal = 1, 9 | Backslash = 2, 10 | Bell = 3, 11 | CarriageReturn = 4, 12 | Escape = 5, 13 | FormFeed = 6, 14 | Linefeed = 7, 15 | Tab = 8, 16 | VerticalTab = 9, 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/GroupInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Diagnostics; 5 | 6 | namespace Regexator.Text.RegularExpressions 7 | { 8 | [DebuggerDisplay("Index: {Index}, Name: {Name}")] 9 | public class GroupInfo 10 | { 11 | internal GroupInfo(int index, string name) 12 | { 13 | Index = index; 14 | Name = name; 15 | } 16 | 17 | protected GroupInfo(GroupInfo info) 18 | { 19 | if (info == null) 20 | throw new ArgumentNullException(nameof(info)); 21 | 22 | Index = info.Index; 23 | Name = info.Name; 24 | } 25 | 26 | public int Index { get; } 27 | 28 | public string Name { get; } 29 | 30 | public static GroupInfo Default { get; } = new GroupInfo(0, "0"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/GroupInfoIndexEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | 5 | namespace Regexator.Text.RegularExpressions 6 | { 7 | public class GroupInfoIndexEqualityComparer : EqualityComparer 8 | { 9 | public override bool Equals(GroupInfo x, GroupInfo y) 10 | { 11 | if (ReferenceEquals(x, y)) 12 | return true; 13 | 14 | if (x == null || y == null) 15 | return false; 16 | 17 | return x.Index == y.Index; 18 | } 19 | 20 | public override int GetHashCode(GroupInfo obj) 21 | { 22 | if (obj != null) 23 | return obj.Index.GetHashCode(); 24 | 25 | return 0; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/GroupSortProperty.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text.RegularExpressions 4 | { 5 | public enum GroupSortProperty 6 | { 7 | Index, 8 | Name 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/LimitState.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text.RegularExpressions 4 | { 5 | //todo MaybeLimited 6 | public enum LimitState 7 | { 8 | None, 9 | Limited, 10 | NotLimited 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/ReplaceItem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Globalization; 4 | using System.Text.RegularExpressions; 5 | 6 | namespace Regexator.Text.RegularExpressions 7 | { 8 | public sealed class ReplaceItem 9 | { 10 | internal ReplaceItem(Match match, string resultValue, int resultIndex, int itemIndex) 11 | { 12 | Match = match; 13 | ItemIndex = itemIndex; 14 | Key = itemIndex.ToString(CultureInfo.CurrentCulture); 15 | Result = new ReplaceResult(resultValue, resultIndex, this); 16 | } 17 | 18 | public override string ToString() => Result.ToString(); 19 | 20 | public int MatchEndIndex => Match.Index + Match.Length; 21 | 22 | public Match Match { get; } 23 | 24 | public int ItemIndex { get; } 25 | 26 | public string Key { get; } 27 | 28 | public ReplaceResult Result { get; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/ReplaceItemCollection.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | using System.Collections.ObjectModel; 5 | 6 | namespace Regexator.Text.RegularExpressions 7 | { 8 | public class ReplaceItemCollection : ReadOnlyCollection 9 | { 10 | internal ReplaceItemCollection(IList list) 11 | : base(list) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/ReplaceResult.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text.RegularExpressions 4 | { 5 | public class ReplaceResult 6 | { 7 | internal ReplaceResult(string value, int index, ReplaceItem replaceItem) 8 | { 9 | Value = value; 10 | Index = index; 11 | ReplaceItem = replaceItem; 12 | } 13 | 14 | public override string ToString() => Value; 15 | 16 | public string Value { get; } 17 | 18 | public int Index { get; } 19 | 20 | public int Length => Value.Length; 21 | 22 | public int EndIndex => Index + Value.Length; 23 | 24 | public ReplaceItem ReplaceItem { get; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/ReplacementMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text.RegularExpressions 4 | { 5 | public enum ReplacementMode 6 | { 7 | None, 8 | ToUpper, 9 | ToLower, 10 | Char 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/SplitItem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text.RegularExpressions 4 | { 5 | public abstract class SplitItem 6 | { 7 | protected SplitItem() 8 | { 9 | } 10 | 11 | public override string ToString() => Value; 12 | 13 | public abstract string Value { get; } 14 | 15 | public abstract int Index { get; } 16 | 17 | public abstract int Length { get; } 18 | 19 | public abstract int ItemIndex { get; } 20 | 21 | public abstract string Name { get; } 22 | 23 | public abstract SplitItemKind Kind { get; } 24 | 25 | public abstract string Key { get; } 26 | 27 | public virtual GroupInfo GroupInfo => null; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/SplitItemKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text.RegularExpressions 4 | { 5 | public enum SplitItemKind 6 | { 7 | Split, 8 | Group 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RegularExpressions/SplitOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator.Text.RegularExpressions 6 | { 7 | [Flags] 8 | public enum SplitOptions 9 | { 10 | None = 0, 11 | OmitGroupValues = 1, 12 | OmitEmptyValues = 2, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/RichTextBoxSearcher.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Windows.Forms; 5 | using Regexator.Text.RegularExpressions; 6 | 7 | namespace Regexator.Text 8 | { 9 | public class RichTextBoxSearcher : TextSearcher 10 | { 11 | public RichTextBoxSearcher(RichTextBox rtb) 12 | : base(new RichTextBoxWrapper(rtb)) 13 | { 14 | RichTextBox = rtb; 15 | RichTextBox.SelectionChanged += (object sender, EventArgs e) => 16 | { 17 | if (ResetEnabled) 18 | OnReset(EventArgs.Empty); 19 | }; 20 | } 21 | 22 | protected override void ReplaceAll(ReplaceItemCollection items, int selectionEnd) 23 | { 24 | using (new ScrollBlocker(RichTextBox)) 25 | base.ReplaceAll(items, selectionEnd); 26 | } 27 | 28 | public RichTextBox RichTextBox { get; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/SearchOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator.Text 6 | { 7 | [Flags] 8 | public enum SearchOptions 9 | { 10 | None = 0, 11 | MatchCase = 1, 12 | MatchWholeWord = 2, 13 | CultureInvariant = 4 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/SearcherState.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | internal enum SearcherState 6 | { 7 | None, 8 | ToEnd, 9 | FromBeginning, 10 | Finished 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/SummaryBuilder.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Text; 4 | 5 | namespace Regexator.Text 6 | { 7 | public class SummaryBuilder : SummaryBuilderBase 8 | { 9 | private StringBuilder _sb; 10 | 11 | public SummaryBuilder() 12 | { 13 | _sb = new StringBuilder(); 14 | } 15 | 16 | public void CreateSummary(SummaryInfo info) 17 | { 18 | _sb = new StringBuilder(); 19 | BuildSummary(info); 20 | } 21 | 22 | public override void Append(string text) 23 | { 24 | if (!string.IsNullOrEmpty(text)) 25 | _sb.Append(text); 26 | } 27 | 28 | public override string ToString() 29 | { 30 | return _sb.ToString(); 31 | } 32 | 33 | public override int Length 34 | { 35 | get { return _sb.Length; } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/SummaryElements.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator.Text 6 | { 7 | [Flags] 8 | public enum SummaryElements 9 | { 10 | None = 0, 11 | Author = 1, 12 | Description = 2, 13 | Title = 4, 14 | Mode = 8, 15 | RegexOptions = 16, 16 | Pattern = 32, 17 | Replacement = 64, 18 | Input = 128, 19 | Output = 256, 20 | Groups = 512, 21 | ReplacementMode = 1024 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/TextBoxSummaryBuilder.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Windows.Forms; 5 | 6 | namespace Regexator.Text 7 | { 8 | public class TextBoxSummaryBuilder : SummaryBuilderBase 9 | { 10 | public void CreateSummary(SummaryInfo info, TextBoxBase textBox) 11 | { 12 | TextBox = textBox ?? throw new ArgumentNullException(nameof(textBox)); 13 | BuildSummary(info); 14 | } 15 | 16 | public override void Append(string text) 17 | { 18 | if (!string.IsNullOrEmpty(text)) 19 | TextBox.AppendText(text); 20 | } 21 | 22 | public override string ToString() 23 | { 24 | return TextBox.Text; 25 | } 26 | 27 | public override int Length 28 | { 29 | get { return TextBox.TextLength; } 30 | } 31 | 32 | public TextBoxBase TextBox { get; private set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/TextLine.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.Text 4 | { 5 | public class TextLine 6 | { 7 | public TextLine() 8 | : this("") 9 | { 10 | } 11 | 12 | public TextLine(string value) 13 | : this(value, -1) 14 | { 15 | } 16 | 17 | public TextLine(string value, int index) 18 | { 19 | Value = value; 20 | Index = index; 21 | } 22 | 23 | public int Index { get; set; } 24 | 25 | public string Value 26 | { 27 | get { return _value; } 28 | set { _value = value ?? ""; } 29 | } 30 | 31 | private string _value; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Regexator.Core/Text/TextSpanComparer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | 5 | namespace Regexator.Text 6 | { 7 | public class TextSpanComparer : IComparer 8 | { 9 | public int Compare(TextSpan x, TextSpan y) 10 | { 11 | if (ReferenceEquals(x, y)) 12 | return 0; 13 | 14 | if (x is null) 15 | return -1; 16 | 17 | if (y is null) 18 | return 1; 19 | 20 | int value = x.Index.CompareTo(y.Index); 21 | 22 | if (value != 0) 23 | return value; 24 | 25 | return x.Length.CompareTo(y.Length); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Regexator.Core/Text/TextSpanExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | 7 | namespace Regexator.Text 8 | { 9 | public static class TextSpanExtensions 10 | { 11 | public static TextSpan Combine(this IEnumerable items) 12 | { 13 | if (items == null) 14 | throw new ArgumentNullException(nameof(items)); 15 | 16 | int index = items.Min(f => f.Index); 17 | return new TextSpan(index, items.Max(f => f.EndIndex) - index); 18 | } 19 | 20 | public static IEnumerable Offset(this IEnumerable items, int indexOffset) 21 | { 22 | if (items == null) 23 | throw new ArgumentNullException(nameof(items)); 24 | 25 | if (indexOffset != 0) 26 | return items.Select(f => f.Offset(indexOffset)); 27 | 28 | return items; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Regexator.Core/TextSearchMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator 4 | { 5 | public enum TextSearchMode 6 | { 7 | Contains, 8 | Equals, 9 | StartsWith, 10 | EndsWith 11 | } 12 | } -------------------------------------------------------------------------------- /src/Regexator.Core/UI/Enums.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | namespace Regexator.UI 4 | { 5 | public enum UIElement 6 | { 7 | Pattern, 8 | Replacement, 9 | Input, 10 | OutputText, 11 | OutputTable, 12 | OutputSummary, 13 | FileSystemSearchResults, 14 | RegexOptions, 15 | Groups, 16 | ProjectInfo, 17 | FindResults, 18 | ProjectExplorer 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Regexator.Core/UI/ProjectInfoPropertyGrid.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Windows.Forms; 4 | 5 | namespace Regexator.UI 6 | { 7 | public class ProjectInfoPropertyGrid : PropertyGrid 8 | { 9 | public ProjectInfoPropertyGrid() 10 | { 11 | Dock = DockStyle.Fill; 12 | HelpVisible = false; 13 | ToolbarVisible = false; 14 | PropertySort = PropertySort.NoSort; 15 | } 16 | 17 | public ProjectInfo SelectedInfo 18 | { 19 | get { return SelectedObject as ProjectInfo; } 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/Regexator.Core/UI/SwitcherItemCollection.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Collections.Generic; 4 | using System.Collections.ObjectModel; 5 | 6 | namespace Regexator.UI 7 | { 8 | public class SwitcherItemCollection : Collection 9 | { 10 | public SwitcherItemCollection() 11 | { 12 | } 13 | 14 | public SwitcherItemCollection(IList list) 15 | : base(list) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Regexator.Core/UndoEventArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.ComponentModel; 4 | 5 | namespace Regexator 6 | { 7 | public class UndoEventArgs : CancelEventArgs 8 | { 9 | public UndoEventArgs(ICommand command) 10 | { 11 | Command = command; 12 | } 13 | 14 | public bool Remove { get; set; } 15 | 16 | public ICommand Command { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Regexator.Core/ValueRestorer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator 6 | { 7 | public sealed class ValueRestorer : IDisposable where T : struct 8 | { 9 | private bool _disposed; 10 | private readonly T _value; 11 | private readonly Action _setter; 12 | 13 | public ValueRestorer(T value, Action setter) 14 | { 15 | _value = value; 16 | _setter = setter ?? throw new ArgumentNullException(nameof(setter)); 17 | } 18 | 19 | public void Dispose() 20 | { 21 | Dispose(true); 22 | GC.SuppressFinalize(this); 23 | } 24 | 25 | private void Dispose(bool disposing) 26 | { 27 | if (!_disposed) 28 | { 29 | if (disposing) 30 | _setter(_value); 31 | 32 | _disposed = true; 33 | } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/Regexator.Core/Windows/Forms/DataGridViewColumnExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Windows.Forms; 5 | 6 | namespace Regexator.Windows.Forms 7 | { 8 | public static class DataGridViewColumnExtensions 9 | { 10 | public static bool IsFullyDisplayed(this DataGridViewBand column) 11 | { 12 | if (column == null) 13 | throw new ArgumentNullException(nameof(column)); 14 | 15 | if (column.DataGridView != null) 16 | { 17 | return column.DataGridView.GetColumnDisplayRectangle(column.Index, false).Width 18 | == column.DataGridView.GetColumnDisplayRectangle(column.Index, true).Width; 19 | } 20 | 21 | return false; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Regexator.Core/Windows/Forms/DataGridViewDisableButtonColumn.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Windows.Forms; 4 | 5 | namespace Regexator.Windows.Forms 6 | { 7 | public sealed class DataGridViewDisableButtonColumn : DataGridViewButtonColumn 8 | { 9 | public DataGridViewDisableButtonColumn() 10 | { 11 | this.CellTemplate = new DataGridViewDisableButtonCell(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Regexator.Core/Windows/Forms/DataGridViewRowCollectionExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Linq; 5 | using System.Windows.Forms; 6 | 7 | namespace Regexator.Windows.Forms 8 | { 9 | public static class DataGridViewRowCollectionExtensions 10 | { 11 | public static DataGridViewRow GetFirstVisibleNotFrozen(this DataGridViewRowCollection collection) 12 | { 13 | return GetFirstVisibleNotFrozen(collection, 0); 14 | } 15 | 16 | public static DataGridViewRow GetFirstVisibleNotFrozen(this DataGridViewRowCollection collection, int startIndex) 17 | { 18 | if (collection == null) 19 | throw new ArgumentNullException(nameof(collection)); 20 | 21 | return collection 22 | .Cast() 23 | .Skip(startIndex) 24 | .FirstOrDefault(f => f.Visible && !f.Frozen); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Regexator.Core/Windows/Forms/DataGridViewRowExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Windows.Forms; 5 | 6 | namespace Regexator.Windows.Forms 7 | { 8 | public static class DataGridViewRowExtensions 9 | { 10 | public static bool IsFullyDisplayed(this DataGridViewBand row) 11 | { 12 | if (row == null) 13 | throw new ArgumentNullException(nameof(row)); 14 | 15 | if (row.DataGridView != null) 16 | { 17 | return row.DataGridView.GetRowDisplayRectangle(row.Index, false).Height 18 | == row.DataGridView.GetRowDisplayRectangle(row.Index, true).Height; 19 | } 20 | 21 | return false; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Regexator.Core/Windows/Forms/ExtendedSplitContainer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System.Windows.Forms; 4 | 5 | namespace Regexator.Windows.Forms 6 | { 7 | public class ExtendedSplitContainer : SplitContainer 8 | { 9 | public ExtendedSplitContainer() 10 | { 11 | Dock = DockStyle.Fill; 12 | TabStop = false; 13 | DoubleBuffered = true; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Regexator.Core/Windows/Forms/ExtendedTreeView.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Windows.Forms; 5 | 6 | namespace Regexator.Windows.Forms 7 | { 8 | public class ExtendedTreeView : TreeView 9 | { 10 | protected override void OnNodeMouseClick(TreeNodeMouseClickEventArgs e) 11 | { 12 | if (e == null) 13 | throw new ArgumentNullException(nameof(e)); 14 | 15 | if (e.Button == MouseButtons.Right) 16 | SelectedNode = e.Node; 17 | 18 | base.OnNodeMouseClick(e); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Regexator.Core/Xml/Serialization/Projects/ProjectSerializationCancelEventArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.ComponentModel; 5 | using System.Diagnostics; 6 | 7 | namespace Regexator.Xml.Serialization.Projects 8 | { 9 | public class ProjectSerializationCancelEventArgs : CancelEventArgs 10 | { 11 | [DebuggerStepThrough] 12 | public ProjectSerializationCancelEventArgs(Regexator.Project project, string filePath) 13 | { 14 | Project = project ?? throw new ArgumentNullException(nameof(project)); 15 | FilePath = filePath ?? throw new ArgumentNullException(nameof(filePath)); 16 | } 17 | 18 | public Regexator.Project Project { get; } 19 | public string FilePath { get; } 20 | public Version ApplicationVersion { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Regexator.Core/Xml/Serialization/Projects/ProjectSerializationEventArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Diagnostics; 5 | 6 | namespace Regexator.Xml.Serialization.Projects 7 | { 8 | public class ProjectSerializationEventArgs : EventArgs 9 | { 10 | [DebuggerStepThrough] 11 | public ProjectSerializationEventArgs(Regexator.Project project, string filePath) 12 | { 13 | Project = project ?? throw new ArgumentNullException(nameof(project)); 14 | FilePath = filePath ?? throw new ArgumentNullException(nameof(filePath)); 15 | } 16 | 17 | public Regexator.Project Project { get; } 18 | public string FilePath { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Regexator.Core/Xml/Serialization/RegexOptionsItem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Text.RegularExpressions; 5 | 6 | namespace Regexator.Xml.Serialization 7 | { 8 | public class RegexOptionsItem 9 | { 10 | public static Regexator.RegexOptionsItem FromSerializable(RegexOptionsItem item) 11 | { 12 | if (item == null) 13 | throw new ArgumentNullException(nameof(item)); 14 | 15 | return new Regexator.RegexOptionsItem(item.ParseOptions(), item.Description, item.Visible); 16 | } 17 | 18 | public RegexOptions ParseOptions() 19 | { 20 | if (Enum.TryParse(Value, true, out RegexOptions value)) 21 | return value; 22 | 23 | return RegexOptions.None; 24 | } 25 | 26 | public string Value { get; set; } 27 | public string Description { get; set; } 28 | public bool Visible { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Regexator.Core/Xml/XmlUtility.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | using System; 4 | 5 | namespace Regexator.Xml 6 | { 7 | public static class XmlUtility 8 | { 9 | public const string CDataEnd = "]]>"; 10 | public const string CDataEndEncoded = "]]>"; 11 | 12 | public static string EncodeCDataEnd(string input) 13 | { 14 | if (input == null) 15 | throw new ArgumentNullException(nameof(input)); 16 | 17 | return input.Replace(CDataEnd, CDataEndEncoded); 18 | } 19 | 20 | public static string DecodeCDataEnd(string input) 21 | { 22 | if (input == null) 23 | throw new ArgumentNullException(nameof(input)); 24 | 25 | return input.Replace(CDataEndEncoded, CDataEnd); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Regexator/AppToolStripRenderer.vb: -------------------------------------------------------------------------------- 1 | Public Class AppToolStripRenderer 2 | Inherits ToolStripProfessionalRenderer 3 | 4 | Protected Overrides Sub OnRenderButtonBackground(e As ToolStripItemRenderEventArgs) 5 | 6 | If e Is Nothing Then Throw New ArgumentNullException("e") 7 | Dim item = TryCast(e.Item, ToolStripButton) 8 | If item IsNot Nothing AndAlso item.Selected = False AndAlso item.Checked Then 9 | Using brush As New SolidBrush(ColorTable.ButtonSelectedHighlight) 10 | e.Graphics.FillRectangle(brush, 0, 0, item.Size.Width, item.Size.Height) 11 | End Using 12 | End If 13 | MyBase.OnRenderButtonBackground(e) 14 | 15 | End Sub 16 | 17 | End Class -------------------------------------------------------------------------------- /src/Regexator/Controls/AppFindToolStrip.vb: -------------------------------------------------------------------------------- 1 | Imports Regexator.UI 2 | 3 | Public Class AppFindToolStrip 4 | Inherits FindToolStrip 5 | 6 | Public Sub New() 7 | 8 | AppUtility.SetToolStripProperties(Me) 9 | 10 | End Sub 11 | 12 | Protected Overrides Function ProcessCtrlTab() As Boolean 13 | 14 | Switcher.Instance.Show() 15 | Return True 16 | 17 | End Function 18 | 19 | Protected Overrides Function ProcessCtrlShiftTab() As Boolean 20 | 21 | Switcher.Instance.Show() 22 | Return True 23 | 24 | End Function 25 | 26 | End Class 27 | -------------------------------------------------------------------------------- /src/Regexator/Controls/AppSearchToolStrip.vb: -------------------------------------------------------------------------------- 1 | Imports Regexator.UI 2 | 3 | Public Class AppSearchToolStrip 4 | Inherits SearchToolStrip 5 | 6 | Public Sub New(rtb As RichTextBox) 7 | 8 | MyBase.New(rtb) 9 | AppUtility.SetToolStripProperties(Me) 10 | 11 | End Sub 12 | 13 | Public Sub New(rtb As RichTextBox, replaceEnabled As Boolean) 14 | 15 | MyBase.New(rtb, replaceEnabled) 16 | AppUtility.SetToolStripProperties(Me) 17 | 18 | End Sub 19 | 20 | Protected Overrides Function ProcessCtrlTab() As Boolean 21 | 22 | Switcher.Instance.Show() 23 | Return True 24 | 25 | End Function 26 | 27 | Protected Overrides Function ProcessCtrlShiftTab() As Boolean 28 | 29 | Switcher.Instance.Show() 30 | Return True 31 | 32 | End Function 33 | 34 | End Class -------------------------------------------------------------------------------- /src/Regexator/Controls/AppTabControl.vb: -------------------------------------------------------------------------------- 1 | Imports Regexator.Windows.Forms 2 | 3 | Public Class AppTabControl 4 | Inherits ExtendedTabControl 5 | 6 | Public Sub New() 7 | 8 | AllowDrop = True 9 | Dock = DockStyle.Fill 10 | Appearance = TabAppearance.FlatButtons 11 | 12 | End Sub 13 | 14 | End Class 15 | -------------------------------------------------------------------------------- /src/Regexator/Controls/AppToolStrip.vb: -------------------------------------------------------------------------------- 1 | Imports Regexator.Windows.Forms 2 | 3 | Public Class AppToolStrip 4 | Inherits ExtendedToolStrip 5 | 6 | Public Sub New() 7 | 8 | AppUtility.SetToolStripProperties(Me) 9 | 10 | End Sub 11 | 12 | Protected Overrides Function ProcessCtrlTab() As Boolean 13 | 14 | Switcher.Instance.Show() 15 | Return True 16 | 17 | End Function 18 | 19 | Protected Overrides Function ProcessCtrlShiftTab() As Boolean 20 | 21 | Switcher.Instance.Show() 22 | Return True 23 | 24 | End Function 25 | 26 | End Class 27 | -------------------------------------------------------------------------------- /src/Regexator/Controls/ExportRichTextBox.vb: -------------------------------------------------------------------------------- 1 | Imports Regexator.Windows.Forms 2 | 3 | Public Class ExportRichTextBox 4 | Inherits ExtendedRichTextBox 5 | 6 | Public Sub New() 7 | 8 | Dock = DockStyle.Fill 9 | BorderStyle = BorderStyle.None 10 | DetectUrls = False 11 | HideSelection = False 12 | Me.ReadOnly = True 13 | Dim cms = New ContextMenuStrip() 14 | cms.Items.Add(ToolStripItemFactory.CreateCopyItem(Me)) 15 | cms.Items.AddSeparator() 16 | cms.Items.Add(ToolStripItemFactory.CreateResetZoomItem(Me)) 17 | cms.Items.AddSeparator() 18 | cms.Items.Add(ToolStripItemFactory.CreatePrintItem(Me)) 19 | ContextMenuStrip = cms 20 | 21 | End Sub 22 | 23 | Public Overrides Sub PrintText() 24 | 25 | Drawing.PrintUtility.Print(Me, My.Resources.Export) 26 | 27 | End Sub 28 | 29 | End Class -------------------------------------------------------------------------------- /src/Regexator/Controls/FormattedPatternRichTextBox.vb: -------------------------------------------------------------------------------- 1 |  2 | #If TATA Then 3 | 4 | Public Class FormattedPatternRichTextBox 5 | Inherits ExtendedRichTextBox 6 | 7 | Public Sub New() 8 | 9 | Me.Dock = DockStyle.Fill 10 | Me.ReadOnly = True 11 | Me.BorderStyle = System.Windows.Forms.BorderStyle.None 12 | Me.DetectUrls = False 13 | Me.ContextMenuStrip = New ContextMenuStrip() 14 | Me.ContextMenuStrip.Items.AddRange({ 15 | New ToolStripMenuItem(My.Resources.Cut, My.Resources.IcoCut.ToBitmap(), Sub() Me.Cut()) With {.ShortcutKeyDisplayString = My.Resources.CtrlX}, 16 | New ToolStripMenuItem(My.Resources.Copy, My.Resources.IcoCopy.ToBitmap(), Sub() Me.Copy()) With {.ShortcutKeyDisplayString = My.Resources.CtrlC}, 17 | New ToolStripSeparator(), 18 | New ToolStripMenuItem(My.Resources.Print & My.Resources.EllipsisStr, My.Resources.IcoPrint.ToBitmap(), Sub() Me.PrintText()) With {.ShortcutKeyDisplayString = My.Resources.CtrlP}}) 19 | 20 | End Sub 21 | 22 | End Class 23 | 24 | #End If 25 | -------------------------------------------------------------------------------- /src/Regexator/Docs/user_guide.mht: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Docs/user_guide.mht -------------------------------------------------------------------------------- /src/Regexator/Docs/user_guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Docs/user_guide.pdf -------------------------------------------------------------------------------- /src/Regexator/Enums.vb: -------------------------------------------------------------------------------- 1 | Public Enum AppFile 2 | 3 | ApplicationLog 4 | FormatGroups 5 | FormatInfos 6 | UserGuideHtml 7 | 8 | End Enum 9 | 10 | Public Enum AppDirectory 11 | 12 | ExceptionLogs 13 | Help 14 | Snippets 15 | 16 | End Enum 17 | 18 | 19 | Public Enum SnippetOptions 20 | 21 | None = 0 22 | HideCategory = 1 23 | Sort = 2 24 | 25 | End Enum 26 | 27 | Public Enum OptionsFormTab 28 | 29 | Application 30 | DefaultValues 31 | Export 32 | ProjectExplorer 33 | Snippets 34 | RegexOptions 35 | 36 | End Enum 37 | 38 | Public Enum TableLayout 39 | 40 | Group 41 | Value 42 | 43 | End Enum 44 | 45 | Public Enum HighlightSource 46 | 47 | None 48 | Text 49 | Table 50 | 51 | End Enum 52 | 53 | Public Enum TextKind 54 | 55 | SelectionOrCurrent 56 | 57 | End Enum 58 | 59 | 60 | Friend Enum KeyStates 61 | 62 | None = 0 63 | Down = 1 64 | Toggled = 2 65 | 66 | End Enum -------------------------------------------------------------------------------- /src/Regexator/ExplorerStatusStripRenderer.vb: -------------------------------------------------------------------------------- 1 | Public Class ExplorerStatusStripRenderer 2 | Inherits ToolStripProfessionalRenderer 3 | 4 | Protected Overrides Sub OnRenderItemText(e As ToolStripItemTextRenderEventArgs) 5 | 6 | If e Is Nothing Then Throw New ArgumentNullException("e") 7 | Dim label = TryCast(e.Item, ToolStripStatusLabel) 8 | If label IsNot Nothing Then 9 | TextRenderer.DrawText(e.Graphics, e.Text, label.Font, e.TextRectangle, label.ForeColor, TextFormatFlags.PathEllipsis) 10 | Else 11 | MyBase.OnRenderItemText(e) 12 | End If 13 | 14 | End Sub 15 | 16 | End Class 17 | -------------------------------------------------------------------------------- /src/Regexator/FileSystemSearchInfo.vb: -------------------------------------------------------------------------------- 1 | Imports Regexator.IO 2 | 3 | Public Class FileSystemSearchContainer 4 | 5 | Public Property Searcher As FileSystemSearcher 6 | Public Property Directories As String() 7 | 8 | End Class 9 | -------------------------------------------------------------------------------- /src/Regexator/FormattedPatternTab.vb: -------------------------------------------------------------------------------- 1 |  2 | #If TATA Then 3 | 4 | Public Class FormattedPanel 5 | 6 | Public Sub New() 7 | 8 | _rtb = New FormattedPatternRichTextBox() 9 | _pnl = New Panel() With {.Dock = DockStyle.Fill, .BorderStyle = BorderStyle.FixedSingle} 10 | 11 | _pnl.Controls.Add(_rtb) 12 | App.Formats.Text.Controls.Add(_rtb) 13 | 14 | End Sub 15 | 16 | Public Sub LoadText(text As String) 17 | 18 | Dim formatter As New PatternFormatter() 19 | _rtb.Text = formatter.Format(text, _tabString) 20 | 21 | End Sub 22 | 23 | Public ReadOnly Property Text As String 24 | Get 25 | Return _rtb.Text 26 | End Get 27 | End Property 28 | 29 | Friend _rtb As FormattedPatternRichTextBox 30 | Friend _pnl As Panel 31 | 32 | Private _tabString As String = " " 33 | 34 | End Class 35 | 36 | #End If 37 | 38 | -------------------------------------------------------------------------------- /src/Regexator/Forms/AboutForm.vb: -------------------------------------------------------------------------------- 1 | Partial Public Class AboutForm 2 | 3 | Public Sub New() 4 | 5 | InitializeComponent() 6 | StartPosition = FormStartPosition.CenterParent 7 | MaximizeBox = False 8 | MinimizeBox = False 9 | FormBorderStyle = FormBorderStyle.FixedSingle 10 | ShowInTaskbar = False 11 | Icon = My.Resources.IcoRegexator 12 | Text = My.Resources.About & " " & My.Application.Info.Title 13 | CancelButton = _btnOk 14 | _btnOk.Text = My.Resources.OK 15 | _lblName.Text = My.Application.Info.Title 16 | _lblVersion.Text = My.Resources.Version & " " & My.Application.Info.Version.ToString(3) 17 | _lblCopyright.Text = My.Application.Info.Copyright 18 | _lblRights.Text = My.Resources.AllRightsReserved 19 | _llbWeb.Text = WebRoot 20 | AddHandler _btnOk.Click, Sub() Close() 21 | AddHandler _llbWeb.LinkClicked, Sub() Process.Start(_llbWeb.Text) 22 | 23 | End Sub 24 | 25 | End Class -------------------------------------------------------------------------------- /src/Regexator/Forms/EulaForm.vb: -------------------------------------------------------------------------------- 1 | Public Class EulaForm 2 | 3 | Public Sub New() 4 | 5 | InitializeComponent() 6 | StartPosition = FormStartPosition.CenterScreen 7 | MaximizeBox = False 8 | MinimizeBox = False 9 | FormBorderStyle = FormBorderStyle.FixedSingle 10 | ShowInTaskbar = False 11 | Icon = My.Resources.IcoRegexator 12 | Text = My.Application.Info.Title 13 | _btnOk.Text = My.Resources.IAgree 14 | _btnCancel.Text = My.Resources.Cancel 15 | CancelButton = _btnCancel 16 | AddHandler _btnOk.Click, Sub(sender As Object, e As EventArgs) 17 | DialogResult = DialogResult.OK 18 | Close() 19 | End Sub 20 | 21 | End Sub 22 | 23 | Protected Overrides Sub OnLoad(e As EventArgs) 24 | 25 | Dim color = _rtb.BackColor 26 | _rtb.ReadOnly = True 27 | _rtb.BackColor = color 28 | _rtb.Rtf = My.Resources.RtfEula 29 | MyBase.OnLoad(e) 30 | 31 | End Sub 32 | 33 | End Class -------------------------------------------------------------------------------- /src/Regexator/HighlightOptions.vb: -------------------------------------------------------------------------------- 1 |  2 | 3 | Public Enum HighlightOptions 4 | 5 | None = 0 6 | DisplayRectangle = 1 7 | 8 | End Enum 9 | -------------------------------------------------------------------------------- /src/Regexator/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.0 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | -------------------------------------------------------------------------------- /src/Regexator/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | false 4 | FrmMain 5 | true 6 | 0 7 | false 8 | 0 9 | true 10 | -------------------------------------------------------------------------------- /src/Regexator/NativeMethods.vb: -------------------------------------------------------------------------------- 1 | Imports System.Runtime.InteropServices 2 | 3 | Friend Module NativeMethods 4 | 5 | 6 | Friend Function SetWindowTheme(hWnd As IntPtr, pszSubAppName As String, pszSubIdList As String) As Integer 7 | End Function 8 | 9 | 10 | Friend Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As ShowWindowCommands) As Boolean 11 | End Function 12 | 13 | End Module 14 | 15 | Friend Enum ShowWindowCommands As Integer 16 | 17 | Hide = 0 18 | Normal = 1 19 | ShowMinimized = 2 20 | Maximize = 3 21 | ShowMaximized = 3 22 | ShowNoActivate = 4 23 | Show = 5 24 | Minimize = 6 25 | ShowMinNoActive = 7 26 | ShowNA = 8 27 | Restore = 9 28 | ShowDefault = 10 29 | ForceMinimize = 11 30 | 31 | End Enum 32 | 33 | -------------------------------------------------------------------------------- /src/Regexator/Panels/Panels.vb: -------------------------------------------------------------------------------- 1 | Public Module Panels 2 | 3 | Friend Property Pattern As PatternPanel 4 | Friend Property Input As InputPanel 5 | Friend Property FileSystemSearchResults As FileSystemSearchResultsPanel 6 | Friend Property Output As OutputPanel 7 | Friend Property OutputText As OutputTextPanel 8 | Friend Property OutputTable As OutputTablePanel 9 | Friend Property Summary As SummaryPanel 10 | Friend Property Options As AppRegexOptionsPanel 11 | Friend Property Groups As GroupPanel 12 | Friend Property Explorer As ExplorerPanel 13 | Friend Property Info As InfoPanel 14 | Friend Property Replacement As ReplacementPanel 15 | Friend Property Export As ExportPanel 16 | Friend Property FindResults As FindResultsPanel 17 | 18 | End Module 19 | -------------------------------------------------------------------------------- /src/Regexator/RecentSnippetItem.vb: -------------------------------------------------------------------------------- 1 | Imports Regexator.Snippets 2 | 3 | Public Class RecentSnippetItem 4 | 5 | Public Sub New(snippet As RegexSnippet, code As String) 6 | 7 | If snippet Is Nothing Then Throw New ArgumentNullException("snippet") 8 | If code Is Nothing Then Throw New ArgumentNullException("code") 9 | _snippet = snippet 10 | _code = code 11 | 12 | End Sub 13 | 14 | Public ReadOnly Property Snippet As RegexSnippet 15 | Get 16 | Return _snippet 17 | End Get 18 | End Property 19 | 20 | Public ReadOnly Property Code As String 21 | Get 22 | Return _code 23 | End Get 24 | End Property 25 | 26 | Private ReadOnly _snippet As RegexSnippet 27 | Private ReadOnly _code As String 28 | 29 | End Class 30 | -------------------------------------------------------------------------------- /src/Regexator/RegexatorApplication.vb: -------------------------------------------------------------------------------- 1 | Imports Microsoft.VisualBasic.ApplicationServices 2 | 3 | Public Class RegexatorApplication 4 | Inherits WindowsFormsApplicationBase 5 | 6 | Public Sub New(mainForm As MainForm) 7 | 8 | #If DEBUG Then 9 | IsSingleInstance = False 10 | #Else 11 | Me.IsSingleInstance = True 12 | #End If 13 | EnableVisualStyles = True 14 | Me.MainForm = mainForm 15 | SaveMySettingsOnExit = False 16 | 17 | End Sub 18 | 19 | End Class 20 | -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoALower.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoALower.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoAUpper.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoAUpper.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoAll.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoArrowDownSmall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoArrowDownSmall.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoArrowLeft.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoArrowLeft.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoArrowLeftSmall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoArrowLeftSmall.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoArrowLeftSmallInverse.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoArrowLeftSmallInverse.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoArrowRight.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoArrowRight.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoArrowRightSmall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoArrowRightSmall.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoArrowRightSmallInverse.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoArrowRightSmallInverse.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoArrows.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoArrows.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoAscending.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoAscending.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCSharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCSharp.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCheckAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCheckAll.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoClose.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoClose.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCode.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCode.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCodeNew.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCodeNew.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCodeOpen.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCodeOpen.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCodeSolution.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCodeSolution.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCollapseAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCollapseAll.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCommentAdd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCommentAdd.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCommentRemove.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCommentRemove.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCompiled.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCompiled.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCopy.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCopy.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCrLf.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCrLf.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCultureInvariant.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCultureInvariant.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCurrent.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCurrent.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoCut.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoCut.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoDelete.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoDelete.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoDescending.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoDescending.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoDescription.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoDescription.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoECMAScript.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoECMAScript.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoExit.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoExit.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoExpandAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoExpandAll.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoExplicitCapture.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoExplicitCapture.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoExport.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoExport.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoExportImport.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoExportImport.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoExtension.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoExtension.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoFile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoFile.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoFileName.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoFileName.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoFileNameWithoutExtension.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoFileNameWithoutExtension.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoFindFirst.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoFindFirst.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoFindLast.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoFindLast.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoFindNext.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoFindNext.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoFindPrevious.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoFindPrevious.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoFolder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoFolder.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoGoToCursor.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoGoToCursor.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoGroupLayout.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoGroupLayout.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoHelp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoHelp.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoHighlightAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoHighlightAll.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoIgnoreCase.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoIgnoreCase.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoIgnorePatternWhitespace.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoIgnorePatternWhitespace.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoImport.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoImport.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoIndentQuotes.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoIndentQuotes.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoInfo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoInfo.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoLayout.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoLayout.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoLetterASmall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoLetterASmall.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoLf.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoLf.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoLimit.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoLimit.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoM.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoM.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoMediaPause.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoMediaPause.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoMediaPlay.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoMediaPlay.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoMediaStop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoMediaStop.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoMultiline.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoMultiline.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoMultilineLiteral.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoMultilineLiteral.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoNewItem.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoNewItem.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoNewProjectWithFileInput.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoNewProjectWithFileInput.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoNewProjectWithInput.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoNewProjectWithInput.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoOpen.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoOpen.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoOpenLink.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoOpenLink.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoPaintRoller.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoPaintRoller.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoPaste.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoPaste.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoPrint.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoPrint.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoR.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoR.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoRectangleSmall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoRectangleSmall.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoReload.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoReload.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoRename.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoRename.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoRightToLeft.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoRightToLeft.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoS.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoS.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSave.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSave.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSaveAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSaveAll.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSearch.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSearch.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSelection.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSelection.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSettings.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSettings.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSingleline.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSingleline.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSnippet.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSnippet.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSnippetExtensible.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSnippetExtensible.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSortAlphabetically.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSortAlphabetically.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoSpaceSymbol.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoSpaceSymbol.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoTilde.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoTilde.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoTree.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoTree.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoUncheckAll.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoUncheckAll.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoUndoEnabled.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoUndoEnabled.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoValueLayout.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoValueLayout.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoVisualBasic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoVisualBasic.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoWidth.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoWidth.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/IcoWordWrap.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/IcoWordWrap.ico -------------------------------------------------------------------------------- /src/Regexator/Resources/PngRegexator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/PngRegexator.png -------------------------------------------------------------------------------- /src/Regexator/Resources/Regexator.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josefpihrt/regexator/e384b14cc0e8b2a7238405b2dcfd6e7657689d2e/src/Regexator/Resources/Regexator.ico -------------------------------------------------------------------------------- /src/Regexator/SnippetDirectory.vb: -------------------------------------------------------------------------------- 1 | Imports System.IO 2 | Imports System.ComponentModel 3 | 4 | Public Class SnippetDirectory 5 | 6 | Public Sub New() 7 | 8 | End Sub 9 | 10 | Public Sub New(info As DirectoryInfo) 11 | 12 | Me.Info = info 13 | 14 | End Sub 15 | 16 | Public Property Path As String 17 | Get 18 | Return _path 19 | End Get 20 | Set(value As String) 21 | _path = If(value, String.Empty) 22 | _info = Nothing 23 | _info = New DirectoryInfo(value) 24 | End Set 25 | End Property 26 | 27 | 28 | Public Property Info As DirectoryInfo 29 | Get 30 | Return _info 31 | End Get 32 | Set(value As DirectoryInfo) 33 | _info = value 34 | _path = If(value IsNot Nothing, value.FullName, String.Empty) 35 | End Set 36 | End Property 37 | 38 | Private _path As String = String.Empty 39 | Private _info As DirectoryInfo 40 | 41 | End Class -------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/Assert.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | Assert 7 | Assert 8 | Pihrtsoft 9 | Lookahead assertion. 10 | 11 | Regular 12 | Surround 13 | 14 | 15 | DotNet 16 | 17 |
18 | 19 | 20 | 21 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/AssertBack.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | AssertBack 7 | Assert Back 8 | Pihrtsoft 9 | Lookbehind assertion. 10 | 11 | Regular 12 | Surround 13 | 14 | 15 | DotNet 16 | 17 |
18 | 19 | 20 | 21 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/Contiguous.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | Contiguous 7 | Contiguous Matches 8 | Pihrtsoft 9 | The match must occur at the position where the previous match ended. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/EndOfLine.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | EndOfLine 7 | End of Line 8 | Pihrtsoft 9 | The match must occur at the end of the string (or line if RegexOptions.Multiline), or before \n at the end of the string (or line if RegexOptions.Multiline). 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/EndOfLineInvariant.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | EndOfLineInvariant 7 | End of Line (invariant) 8 | Pihrtsoft 9 | The match must occur at the end of the string or line, or before \n at the end of the string or line. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/EndOfLineOrBeforeCarriageReturn.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | EndOfLineOrBeforeCarriageReturn 7 | End of Line or Before Carriage Return 8 | Pihrtsoft 9 | The match must occur before \r at the end of the string (or line if RegexOptions.Multiline), or at the end of the string (or line if RegexOptions.Multiline). 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/EndOfString.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | EndOfString 7 | End of String 8 | Pihrtsoft 9 | The match must occur at the end of the string only. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/EndOfStringOrBeforeEndingLinefeed.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | EndOfStringOrBeforeEndingLinefeed 7 | End of String or Before Ending Linefeed 8 | Pihrtsoft 9 | The match must occur at the end of the string, or before \n at the end of the string. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/EntireInput.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | EntireInput 7 | Entire Input 8 | Pihrtsoft 9 | Entire input. 10 | 11 | Regular 12 | Surround 13 | 14 | 15 | DotNet 16 | 17 |
18 | 19 | 20 | 21 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/NotAssert.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | NotAssert 7 | Assert Negative 8 | Pihrtsoft 9 | Negative lookahead assertion. 10 | 11 | Regular 12 | Surround 13 | 14 | 15 | DotNet 16 | 17 |
18 | 19 | 20 | 21 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/StartOfLine.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | StartOfLine 7 | Start of Line 8 | Pihrtsoft 9 | The match must occur at the beginning of the string (or line if RegexOptions.Multiline). 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/StartOfLineInvariant.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | StartOfLineInvariant 7 | Start of Line (invariant) 8 | Pihrtsoft 9 | The match must occur at the beginning of the string or line. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/StartOfString.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | StartOfString 7 | Start of String 8 | Pihrtsoft 9 | The match must occur at the beginning of the string only. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Anchors/WordBoundary.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Anchors 6 | WordBoundary 7 | Word Boundary 8 | Pihrtsoft 9 | Between \w and \W character. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/Alphanumeric.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | Alphanumeric 7 | Alphanumeric 8 | Pihrtsoft 9 | Matches an alphanumeric character (a-z, A-Z or 0-9). 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/AlphanumericLower.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | AlphanumericLower 7 | Alphanumeric Lower 8 | Pihrtsoft 9 | Matches a lower-case alphanumeric character (a-z or 0-9). 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/AlphanumericUpper.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | AlphanumericUpper 7 | Alphanumeric Upper 8 | Pihrtsoft 9 | Matches a upper-case alphanumeric character (A-Z or 0-9). 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/AnyInvariant.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | AnyInvariant 7 | Any Character (invariant) 8 | Pihrtsoft 9 | Matches any character. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/AnyMaybeManyLazy.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | AnyMaybeManyLazy 7 | Any Maybe Many (lazy) 8 | Pihrtsoft 9 | Matches any character zero or more times, but as few times as possible. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/ArabicDigit.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | ArabicDigit 7 | Arabic Digit 8 | Pihrtsoft 9 | Matches an arabic digit (0-9). 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/Digit.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | Digit 7 | Digit 8 | Pihrtsoft 9 | Matches a digit. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/HexadecimalDigit.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | HexadecimalDigit 7 | Hexadecimal Digit 8 | Pihrtsoft 9 | Matches a hexadecimal digit. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/LatinLetter.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | LatinLetter 7 | Latin Letter 8 | Pihrtsoft 9 | Matches a latin letter (a-z or A-Z). 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/NewLineChar.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | NewLineChar 7 | New Line Character 8 | Pihrtsoft 9 | Matches a carriage return or a linefeed. 10 | 11 | Regular 12 | Surround 13 | 14 | 15 | DotNet 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/WhiteSpaceCharacter.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | WhiteSpaceCharacter 7 | White-Space Character 8 | Pihrtsoft 9 | Matches a white-space character. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/WhiteSpaceExceptNewLine.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | WhiteSpaceExceptNewLine 7 | White-Space Character Except New Line 8 | Pihrtsoft 9 | Matches a white-space character that is not a new line character (carriage return and linefeed). 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterClasses/WordCharacter.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterClasses 6 | WordCharacter 7 | Word Character 8 | Pihrtsoft 9 | Matches a word character. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/ASCIIChar.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | ASCIIChar 7 | ASCII Character 8 | Pihrtsoft 9 | An ASCII character (hexadecimal two digits) 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/ASCIIControlChar.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | ASCIIControlChar 7 | ASCII Control Character 8 | Pihrtsoft 9 | An ASCII control character 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/Backspace.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | Backspace 7 | Backspace 8 | Pihrtsoft 9 | A backspace (\u0008) 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/Bell.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | Bell 7 | Bell 8 | Pihrtsoft 9 | A bell character (\u0007) 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/CarriageReturn.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | CarriageReturn 7 | Carriage Return 8 | Pihrtsoft 9 | A carriage return (\u000D) 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/Escape.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | Escape 7 | Escape 8 | Pihrtsoft 9 | An escape (\u001B) 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/FormFeed.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | FormFeed 7 | Form Feed 8 | Pihrtsoft 9 | A form feed (\u000C) 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/Linefeed.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | Linefeed 7 | Linefeed 8 | Pihrtsoft 9 | A linefeed (\u000A) 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/NewLine.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | NewLine 7 | New Line 8 | Pihrtsoft 9 | Matches a linefeed, optionally preceded with a carriage return. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/Tab.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | Tab 7 | Tab 8 | Pihrtsoft 9 | A tab (\u0009) 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/CharacterEscapes/VerticalTab.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | CharacterEscapes 6 | VerticalTab 7 | Vertical Tab 8 | Pihrtsoft 9 | A vertical tab (\u000B) 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Miscellaneous/AngleBrackets.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Miscellaneous 6 | AngleBrackets 7 | Angle Brackets 8 | Pihrtsoft 9 | Angle brackets 10 | 11 | Regular 12 | Surround 13 | 14 | 15 | DotNet 16 | 17 |
18 | 19 | 20 | ]]> 21 | ]]> 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Miscellaneous/CurlyBrackets.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Miscellaneous 6 | CurlyBrackets 7 | Curly Brackets 8 | Pihrtsoft 9 | Curly brackets 10 | 11 | Regular 12 | Surround 13 | 14 | 15 | DotNet 16 | 17 |
18 | 19 | 20 | 21 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Miscellaneous/InlineComment.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Miscellaneous 6 | InlineComment 7 | Inline Comment 8 | Pihrtsoft 9 | Inline comment (ends at the first closing parenthesis). 10 | 11 | Regular 12 | Surround 13 | 14 | 15 | DotNet 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Quantifiers/Maybe.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Quantifiers 6 | Maybe 7 | Maybe 8 | Pihrtsoft 9 | Matches the previous element zero or one time. 10 | 11 | Surround 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Quantifiers/MaybeMany.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Quantifiers 6 | MaybeMany 7 | Maybe Many 8 | Pihrtsoft 9 | Matches the previous element zero or more times. 10 | 11 | Surround 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Quantifiers/OneMany.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Quantifiers 6 | OneMany 7 | One Many 8 | Pihrtsoft 9 | Matches the previous element one or more times. 10 | 11 | Surround 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Substitutions/SubstituteDollar.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Substitutions 6 | SubstituteS 7 | Substitute $ 8 | Pihrtsoft 9 | Substitutes a literal "$". 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Substitutions/SubstituteEntireInputString.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Substitutions 6 | SubstituteEntireInputString 7 | Substitute Entire Input String 8 | Pihrtsoft 9 | Substitutes the entire input string. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Substitutions/SubstituteEntireMatch.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Substitutions 6 | SubstituteEntireMatch 7 | Substitute Entire Match 8 | Pihrtsoft 9 | Substitutes the entire match. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Substitutions/SubstituteLastCapturedGroup.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Substitutions 6 | SubstituteLastCapturedGroup 7 | Substitute Last Captured Group 8 | Pihrtsoft 9 | Substitutes the last captured group. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Substitutions/SubstituteTextAfterMatch.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Substitutions 6 | SubstituteTextAfterMatch 7 | Substitute Text After Match 8 | Pihrtsoft 9 | Substitutes all the text of the input string after the match. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/Snippets/Substitutions/SubstituteTextBeforeMatch.rgxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | Substitutions 6 | SubstituteTextBeforeMatch 7 | Substitute Text Before Match 8 | Pihrtsoft 9 | Substitutes all the text of the input string before the match. 10 | 11 | Regular 12 | 13 | 14 | DotNet 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/Regexator/SubstitutionSnippetSorter.vb: -------------------------------------------------------------------------------- 1 | Imports Regexator.Snippets 2 | 3 | Public Class SubstitutionSnippetSorter 4 | Implements IComparer(Of RegexSnippet) 5 | 6 | Public Function Compare(x As RegexSnippet, y As RegexSnippet) As Integer Implements IComparer(Of RegexSnippet).Compare 7 | 8 | If ReferenceEquals(x, y) Then 9 | Return 0 10 | End If 11 | If ReferenceEquals(x, Nothing) Then 12 | Return -1 13 | End If 14 | If ReferenceEquals(y, Nothing) Then 15 | Return 1 16 | End If 17 | If x.Favorite Then 18 | If y.Favorite Then 19 | Return String.Compare(x.Title, y.Title, StringComparison.CurrentCulture) 20 | Else 21 | Return -1 22 | End If 23 | Else 24 | If y.Favorite Then 25 | Return 1 26 | Else 27 | Return String.Compare(x.Title, y.Title, StringComparison.CurrentCulture) 28 | End If 29 | End If 30 | 31 | End Function 32 | 33 | End Class 34 | -------------------------------------------------------------------------------- /tools/build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set _programFiles=%ProgramFiles(x86)% 4 | if not defined _programFiles set _programFiles=%ProgramFiles% 5 | 6 | "%_programFiles%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild" "..\src\Regexator.sln" ^ 7 | /t:Clean,Build ^ 8 | /p:Configuration=Release,RunCodeAnalysis=false,TreatWarningsAsErrors=true,WarningsNotAsErrors=1591 ^ 9 | /nr:false ^ 10 | /v:normal ^ 11 | /m 12 | 13 | pause --------------------------------------------------------------------------------