recursivebytes

Proudly presented by 0

28.12.2014

The following table contains a list of very useful regular expressions which can be used in C#/.NET or other RegEx-capable programming languages. Be aware that the expressions in the table are designed for .NET and may use .NET-specific sequences!

RegEx-Tester is an extremely useful litte tool which may help developing and validating complex regular expressions.

 

RegexDescription
@"<\s*(\w+)\s*((""|').*?(""|')|[^'"">]+)*?\s*>"Matches any string that looks like a XML / HTML tag (while ignoring contents of strings).

Groups[1] = Tagname
@"^([\w0-9_\-\.]+)@([\w0-9_\-\.]+?)\.(\w{2,})"Matches an email address.

Groups[1] = Name
Groups[2] = Domain
Groups[3] = TLD
@"^([a-z]:\\)?([^\\\n]+\\)*?([^\\\n]+)$"Matches a file path

Groups[1] = Drive (if absolute path)
Groups[2] = Array of directories (if present)
Groups[3] = Filename
@"^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3,3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$"Validates a IP Address (incl. IP range)

Groups[2] = Class C Network
Groups[3] = Class C Host
@"^((0|128|192|224|240|248|252|254|255)\.){3,3}(0|128|192|224|240|248|252|254|255)"Validates a Subnet-Mask (incl. valid range)
@"^[A-z_][\w\-]{2,15}$"
or (german):
@"^[A-zöäüÖÄÜ][\wöäüÖÄÜß\-]{2,15}$"
Username (3-16 characters, starting with letter or underscore)
@"^((([A-z]+)://)?(\w+:\w+@)?(([\w\.\-~]+\.)?[\w\.\-~]+)(:\d+)?)?(/([^\n#?!$&'\(\)\[\]/:;=@]+?/)*([^\n#?!$&'\(\)\[\]/:;=@]+)?(\?([\w%]+?=[\w%]+\&)*[\w%]+?=[\w%]+)?(#[\w%]+)?)?$"Validates a URL (relative and absolute) in detail.

Groups[3] = Protocol
Groups[5] = username:password
Groups[6] = Serveraddress
Groups[9] = Port
Groups[11] = Array of resource path
Groups[12] = Resourcename
Groups[13] = Parameter-String
Groups[15] = Text Anchor

 

 

Example of usage:

 

 

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

23.12.2014

 

Extended Lite-C Syntax Highliting

highlight

The code highlighting is very advanced compared to other IDEs and editors. The highlighting of engine-specific functions and variables differs to user defined content

 

Fully customizable workspace

customize

Like other professional IDEs consists the workspace of panels and documents and can be customized by the developer. The system is based on AvalonDock and supports all of the features, like Aero Snap.

 

Multi-Purpose Go To

goto

An innovative feature which sets Horus apart from other solutions. Just press Ctrl+G and type something in. Horus tries to estimate where do you want to go. This can be a line of the current document, the definition of a var / function / struct or a codefile in the project

 

Copy/Paste-History

history

When copying text in Horus the last 10 scraps remain in the memory and can still be pasted, not with Ctrl+V, but with Ctrl+Shift+V

 

Code-Snippets and Templates

snippets

Create snippets of often used code (for example a function prototype) and fill it in if needed by selecting it via autocomplete. This mechanism is very similar to Visual Studio Code Snippets.

 

Code-Regions

regions

Start a multiline comment with region xxx, add a second one it with endregion and Horus will fold anything between. You can use this for better organizing your code. This is similar to the C# #region directive. But it is based on comment blocks, to remain the correctness of code.

 

File Loss Protection

restore

Horus takes care about your work. The open files are continuously backuped. If your computer crashes Horus will notice this and ask you in a gently way if you want to restore the lost information. Horus itself should not crash, Released versions run on a very well tested codebase. This is one reason why the development of Horus is not very fast, it´s build against reliability

 

No saving needed

Closing Horus will not annoy you by popping up millions of do-you-want-to-save-your-changes-dialogboxes. It will just close Horus without asking you. But all of the unsaved work isn´t lost. It is saved temporarily and gets reloaded if the editor starts again. It is, as you never closed Horus

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

25.12.2014

Version 1

Codename “cyanPhoelogo_bluenix”

This branch was the first finished branch of Horus.
The main focus of this branch was the basic IDE-Architecture and early support for some Web-Languages like HTML and CSS. A stable Version 1.0.0, 1.1.0 and 1.2.0 has been finished successfully.

Main Features of this branch:

  • Basic Editor-Features (Configuration-Management, File-Management, etc)
  • UI-Design (Menus, Toolbars, arrangeable Panels, etc)
  • Syntax-Highlighting for Web-Languages
  • Integrated Color Chooser

With ending of 1.x the editor was a first useful alternative to some common Web-Editors and prepared for the next big step of its development: Version 2.

 

Version 2

logo_redCodename “firebrickGriffin”

This branch is the first public release of Horus.
The main focus of this branch is the GameStudio-Support. The aim is to provide a useful IDE and an alternative to the scripting editor SED.

Main Features of this branch:

  • Syntax-Highlighting of GameStudio-Related files and formats
  • Build-Task for Acknex-Games (Run and Publish)
  • Code Completion
  • Documenting-System (see Description and Information of functions, etc)
  • Refactoring Tools for Lite-C

There are 4 minor releases: 2.0.0 – 2.3.0
With ending of 2.x the editor is a handy and stable IDE for Lite-C.

 

Version 3

logo_greenCodename “lawngreenParrot”

This is the upcoming branch of Horus. It is currently under development.
The main focus of this branch is the project support. The aim is to provide a better project-management.

Main features of this branch:

  • Project-Files and their management
  • seemless integration of a Bugtracker
  • Versioning-Support

With ending of 3.x the editor should be a full-featured IDE for Lite-C.

 

Version 4

logo_blueCodename “aquaDuck”

This branch will extend version 3 by useful tools and generators.

First versions are not expected before 2015.

 

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)