Hi,

attached is a script which essentially executes

  Print RegExp.Replace(" * * a *", "^[ ]*\\*", "'")

On my system the output is

  '' a *

which I don't understand. As the regular expression indicates I want only
the one match at the beginning of the line to be replaced. Not the second
one behind it. The "a" acts like a border, to see if the "^" is completely
ignored -- but it isn't.

The error seems to come from

--8<-- [ trunk/gb.pcre/src/regexp.c ]---------------------------------------
389                         r.subject = &subject[offset];
--8<------------------------------------------------------------------------

I guess that this should prevent recursive (indefinite) substitutions in the
replacement string... But if you ask me, the result of my script is wrong.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
#!/usr/bin/gbs3

Use "gb.pcre"

Public Sub Main()
  Print RegExp.Replace(" * * a *", "^[ ]*\\*", "'")
End
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to