Ticket #73 (closed defect: fixed)
Empty captures issue in microregex
| Reported by: | mooneer | Owned by: | mooneer |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | microregex | Version: | 1.0b6 |
| Keywords: | Cc: |
Description
Example:
import "System.regex";
txt = "http://kite-language.org/docs/kdoc-1.0b8/interface.http.html http://www.google.com/ http://random.com:8080/";
url_rgx = make System.regex("http://([^/: ]+)(:([0-9]+))?(/[^ ]*)?");
rgx_result = url_rgx|match(txt);
while(not (rgx_result is System.null)) [
rgx_result.captures|print;
rgx_result = url_rgx|match(txt, rgx_result.match_begin + rgx_result.match_length);
];
Intended result:
[http://kite-language.org/docs/kdoc-1.0b8/interface.http.html, kite-language.org, , , /docs/kdoc-1.0b8/interface.http.html] [http://www.google.com/, www.google.com, , , /] [http://random.com:8080/, random.com, :8080, 8080, /]
Actual result:
[http://kite-language.org/docs/kdoc-1.0b8/interface.http.html, kite-language.org, , , , /docs/kdoc-1.0b8/interface.http.html] [http://www.google.com/, www.google.com, , , , /] [http://random.com:8080/, random.com, :8080, 8080, /]
Change History
Note: See
TracTickets for help on using
tickets.

Fixed in r482, but should see if there are side-effects.