On Tue, 10 Mar 2009, Szak�ts Viktor wrote: Hi,
[...] > I don't use this function, but this seems clearly wrong (came > from xhb), so IMO it should be fixed. Documentation says that > 3rd parameter controls case sensitivity. > Depending on the 3rd parameter, HB_REGEXMATCH() is a > synonym to HB_REGEXHAS() and HB_REGEXLIKE(), so it > doesn't give any extra functionality. > Suggestions for fix: > 1.) Move it to xhb.lib with this bug intact. > 2.) Fix it by using hb_parl( 5 ) in HB_REGEXMATCH(). > This will make it in sync with the documentation, but > can break apps, relying on odd behaviour. > (my vote for 2.) > Opinions? I know about this bug and I even intentionally replicated it in the past to discuss the fix with xHarbour developers. Meanwhile as workaround I added hb_regexLike() and hb_regexHas(). I do not know if xHarbour developers are interested in fixing the problem. Now hb_regexMatch() does not give any new functionality so we can remove it. Probably it will be the best choice also for users which ports some xHarbour code to Harbour because during linking they will have information about function which for sure should be fixed. Anyhow RegexMatch is commonly used name so maybe we should leave it and add support for the 5-th parameter and by default it should be set to HAS. In such version I do not have to use 5-th parameter but I can simply define pattern which will have to cover whole value. I vote for this. It's 2. best regards, Przemek _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
