History log of /haiku/src/kits/shared/RegExp.cpp
Revision Date Author Comments
# 83181998 16-Oct-2013 Adrien Destugues <pulkomandy@pulkomandy.tk>

RegExp: fix match count computation

* There actually is a way to count the matches, so use it instead of
attempting to guess
* In some cases (when using optional groups (xxx)?, for example), there
may be a non-matching group (with offsets set to -1) and matching groups
after it, so the binary search wasn't quite working
* Instead, we always return the number of capturing groups in the in
the given expression, which is the maximal number of matches. Some (or
all) of these may not have any content. We do return 0 matches on any
error, including when the regular expression didn't match anything.


# 7d4a7ce3 05-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Add ability to specify case insensitive matching.


# 47fedeb5 05-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Import RegExp classes from Ham.

Minor adjustments made by myself to fit into Haiku better.


# 831819980e20ba903d97b2917c5cb3aec3091eb5 16-Oct-2013 Adrien Destugues <pulkomandy@pulkomandy.tk>

RegExp: fix match count computation

* There actually is a way to count the matches, so use it instead of
attempting to guess
* In some cases (when using optional groups (xxx)?, for example), there
may be a non-matching group (with offsets set to -1) and matching groups
after it, so the binary search wasn't quite working
* Instead, we always return the number of capturing groups in the in
the given expression, which is the maximal number of matches. Some (or
all) of these may not have any content. We do return 0 matches on any
error, including when the regular expression didn't match anything.


# 7d4a7ce33e25255b4eb925248b1de9295872b907 05-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Add ability to specify case insensitive matching.


# 47fedeb5982c2e449fcb75a5b7d2db4c8b4430e4 05-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Import RegExp classes from Ham.

Minor adjustments made by myself to fit into Haiku better.