Skip to content

VerbalExpressions/ValaVerbalExpressions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Vala regular expressions made easy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published