mbregex missing documentation about supported RE syntax
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Description
The following code:
<?php
mb_ereg_search_init("qaaoiuu");
mb_ereg_search_setpos(1);
var_dump(mb_ereg_search_pos("^a{2}(..)u{2}"));
Resulted in this output:
bool(false)
But I expected this output instead:
array(2) {
[0]=>
int(1)
[1]=>
int(6)
}
The "^" modifier is not applying to the start of the whole string either (independently of "setpos"), as :
<?php
mb_ereg_search_init("aaoiuu");
mb_ereg_search_setpos(1);
var_dump(mb_ereg_search_pos("^a{2}(..)u{2}"));
Returns false too (this should be expected).
bool(false)
Does "^" have a different meaning in the mb_ereg_search functions?
PHP Version
PHP 8.1.12 and previous versions
Operating System
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the mb_ereg_search functions and the documented regular-expression syntax, then reproduce the examples using PHP 8.1. Document the meaning of ^ when searching with mb_ereg_search and clarify the supported syntax so the reported behavior is explained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100