Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.2 KB

README.md

File metadata and controls

55 lines (39 loc) · 1.2 KB

ValaVerbalExpressions

Regular expressions in Vala made easy

Installing / Getting started

To build this library, you need Meson, and Vala >= 0.28

git clone https://github.com/VerbalExpressions/ValaVerbalExpressions.git
cd ValaVerbalExpressions/
mkdir build
cd build
meson setup
ninja

To install system-wide, follow the Meson help pages

Usage

	var verbex = new VerbalExpression()
		.start_of_line()
		.then("http")
		.maybe("s")
		.then("://")
		.maybe("www.")
		.anything_but(" ")
		.end_of_line();
	// Create an example URL
	var test_me = "https://www.vala-project.org";
	// Verify using VerbalExpression's matches() method
	assert_true(verbex.matches(test_me));

Missing Features

Patches accepted for the following features

  • Capture/subgroups
  • Efficient expression composition
  • Anything else (?)

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Please keep the code style, whitespace changes that do not adhere to the coding standart won't be merged.

Licensing

The code in this project is licensed under the MIT license.