All Projects → VerbalExpressions → Rverbalexpressions

VerbalExpressions / Rverbalexpressions

Licence: other
💬 Create regular expressions easily

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Rverbalexpressions

Social Media Profiles Regexs
📇 Extract social media profiles and more with regular expressions
Stars: ✭ 324 (+32.24%)
Mutual labels:  regex, regular-expressions
Ore
An R interface to the Onigmo regular expression library
Stars: ✭ 54 (-77.96%)
Mutual labels:  regex, regular-expressions
Py regular expressions
Learn Python Regular Expressions step by step from beginner to advanced levels
Stars: ✭ 770 (+214.29%)
Mutual labels:  regex, regular-expressions
Re Flex
The regex-centric, fast lexical analyzer generator for C++ with full Unicode support. Faster than Flex. Accepts Flex specifications. Generates reusable source code that is easy to understand. Introduces indent/dedent anchors, lazy quantifiers, functions for lex/syntax error reporting, and more. Seamlessly integrates with Bison and other parsers.
Stars: ✭ 274 (+11.84%)
Mutual labels:  regex, regular-expressions
Regex
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
Stars: ✭ 2,125 (+767.35%)
Mutual labels:  regex, regular-expressions
Regex
The Hoa\Regex library.
Stars: ✭ 308 (+25.71%)
Mutual labels:  regex, regular-expressions
Inferregex
Infer the regular expression (regex) of a string 🔤 🔢 🔍
Stars: ✭ 41 (-83.27%)
Mutual labels:  regex, regular-expressions
lc-data-intro
Library Carpentry: Introduction to Working with Data (Regular Expressions)
Stars: ✭ 16 (-93.47%)
Mutual labels:  regex, regular-expressions
Nim Regex
Pure Nim regex engine. Guarantees linear time matching
Stars: ✭ 136 (-44.49%)
Mutual labels:  regex, regular-expressions
Proposal Regexp Unicode Property Escapes
Proposal to add Unicode property escapes `\p{…}` and `\P{…}` to regular expressions in ECMAScript.
Stars: ✭ 112 (-54.29%)
Mutual labels:  regex, regular-expressions
Pawn.Regex
🔎 Plugin that adds support for regular expressions in Pawn
Stars: ✭ 34 (-86.12%)
Mutual labels:  regex, regular-expressions
Grex
A command-line tool and library for generating regular expressions from user-provided test cases
Stars: ✭ 4,847 (+1878.37%)
Mutual labels:  regex, regular-expressions
crystular
Crystal regex tester http://www.crystular.org/
Stars: ✭ 31 (-87.35%)
Mutual labels:  regex, regular-expressions
Fancy Regex
Rust library for regular expressions using "fancy" features like look-around and backreferences
Stars: ✭ 199 (-18.78%)
Mutual labels:  regex, regular-expressions
RgxGen
Regex: generate matching and non matching strings based on regex pattern.
Stars: ✭ 45 (-81.63%)
Mutual labels:  regex, regular-expressions
Verbalex
A library for creating complex, composable regular expressions with the reader & writer in mind. 🔍
Stars: ✭ 26 (-89.39%)
Mutual labels:  regex, regular-expressions
python-hyperscan
A CPython extension for the Hyperscan regular expression matching library.
Stars: ✭ 112 (-54.29%)
Mutual labels:  regex, regular-expressions
unmatcher
Regular expressions reverser for Python
Stars: ✭ 26 (-89.39%)
Mutual labels:  regex, regular-expressions
Youtube Regex
Best YouTube Video ID regex. Online: https://regex101.com/r/rN1qR5/2 and http://regexr.com/3anm9
Stars: ✭ 87 (-64.49%)
Mutual labels:  regex, regular-expressions
Npeg
PEGs for Nim, another take
Stars: ✭ 163 (-33.47%)
Mutual labels:  regex, regular-expressions

RVerbalExpressions

Travis build status AppVeyor Build status CRAN status CRAN_Download_Badge Codecov test coverage

The goal of RVerbalExpressions is to make it easier to construct regular expressions using grammar and functionality inspired by VerbalExpressions. Usage of %>% is encouraged to build expressions in a chain like fashion.

Installation

Install the released version of RVerbalExpressions from CRAN:

install.packages("RVerbalExpressions")

Or install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("VerbalExpressions/RVerbalExpressions")

Example

This is a basic example which shows you how to build a regular expression:

library(RVerbalExpressions)

# construct an expression
x <- rx_start_of_line() %>% 
  rx_find('http') %>% 
  rx_maybe('s') %>% 
  rx_find('://') %>% 
  rx_maybe('www.') %>% 
  rx_anything_but(' ') %>% 
  rx_end_of_line()

# print the expression
x
#> [1] "^(http)(s)?(\\://)(www\\.)?([^ ]*)$"

# test for a match
grepl(x, "https://www.google.com")
#> [1] TRUE

Other Implementations

You can see an up to date list of all ports on VerbalExpressions.github.io.

Additionally, there are two R packages that try to solve the same problem. I encourage you to check these out:

  1. rex by @kevinushey
  2. rebus by @richierocks

Contributing

If you find any issues, typos, etc., please file an issue or submit a PR. All contributions are welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].