Skip to content
#

regular-expressions

Here are 387 public repositories matching this topic...

mqudsi
mqudsi commented Mar 29, 2020

I was bitten pretty hard (my fault!) by a subtle difference in eXtended mode's handling of spaces in character classes. I was expecting (except in a much more complicated context) (?x)[ ] to match a single space as it does with pcre2, but that does not seem to be the case (and doesn't seem to be documented?).

In PCRE2, (?x) enables spurious use of whitespace everywhere except in character c

doc
Danon
Danon commented May 3, 2020
[$value, $unit] = pattern('(\d+)[cm]m')->match('13cm')->tuple(1, 2)->first();

$value // '14'
$unit // 'cm'

Of course it should throw for invalid groups, nonexistent groups and unmatched groups.

Ideally, it should be similar to

[$value, $unit] = pattern('(\d+)[cm]m')->match('13cm')->first(function (Match $match) {
  return [$match->get(1), $match->get(2)];
});
``
dmi3kno
dmi3kno commented Mar 14, 2019

I have been thinking how to organize package documentation. We basically have a few "groups" of functions that may make sense to be introduced together (at least in pkgdown):

Single-character functions

These are functions that return one character and do not require any "wrappers"

  • rx_alpha_num
  • rx_br and rx_line_break
  • rx_digit
  • rx_something
  • rx_space
  • rx_tab

The regex-centric, fast lexical analyzer generator for C++ with full Unicode support. Faster than Flex and other regex matchers. Accepts Flex specifications. Generates reusable source code that is easy to understand. Seamlessly integrates with Bison and other parsers.

  • Updated Jul 9, 2020
  • C++
pacdiv
pacdiv commented Oct 29, 2019

Do you want to request a feature or report a bug?
Feature.

What is the current behavior?
The Playground's full sentence is quite long to read and the ending question is useless. Besides, it does not help to understand the table result shown right below this sentence.
_Let‘s write
a [global or not] regex
verifying that the text
[type your text here]
does
[contain|start with|end w

Improve this page

Add a description, image, and links to the regular-expressions topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the regular-expressions topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.