The OR operator (|
) in the regex
module
#19926
Labels
Feature Request
This issue is made to request a feature.
|
) in the regex
module
#19926
Describe the feature
To make the regex module PCRE compliant, or alternatively make the pcre module the default regex module.
Use Case
I am frustrated at the fact that, for example, int|float does not match
int
orfloat
, rather it would matchinfloat
, which seems to make little sense. I cannot see why this is useful, and a PCRE compliant regex module would be much more useful than having a special one for V.Proposed Solution
Make the regex module PCRE compliant. This could be as simple as making the
pcre
module the default regex engine, by simply renaming it.Other Information
If this isn't ideal, you could at least make it so that the OR operator works as it does in PCRE.
Acknowledgements
Version used
V full version: V 0.4.3 a2dabdd.fbb43f5
Environment details (OS name and version, etc.)
V full version: V 0.4.3 a2dabdd.fbb43f5
OS: linux, Debian GNU/Linux 12 (bookworm)
Processor: 12 cpus, 64bit, little endian, 11th Gen Intel(R) Core(TM) i5-11400F @ 2.60GHz
getwd: /home/werdl/coding/vcc
vexe: /home/werdl/coding/vcss/v/v
vexe mtime: 2023-11-12 16:16:21
vroot: OK, value: /home/werdl/coding/vcss/v
VMODULES: OK, value: /home/werdl/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.39.2
Git vroot status: weekly.2023.44-117-gfbb43f5a (58 commit(s) behind V master)
.git/config present: true
CC version: cc (Debian 12.2.0-14) 12.2.0
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: