(didnt test it under unix)
Btw I think the manual should provide a better exmaple of the use regex-
comp.. I got it from Python that I know how this works..
This works ->
Code: Select all
> (find-all {\d+} "1 2 3 4 numbers upto 5 6 7 8 in it." )
("1" "2" "3" "4" "5" "6" "7" "8")
This doesnt ->
Code: Select all
(setq p1 (regex-comp {\d+} ))
"ERCP1\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000d\000\000\000(\000\003\000\000\000\000\000\000\000\000\000\000\000\000\000P\000\005,\006B\000\005\000"
> (find-all p1 "1 2 3 4 numbers upto 5 6 7 8 in it." 0x10000 )
()
And replace does work directly with regex-comp..
Code: Select all
> (replace p1 "1 2 3 4 numbers upto 5 6 7 8 in it." "+" 0x10000 )
"+ + + + numbers upto + + + + in it."
Recapturing... or only replace does work or my example doesnt work..
Anyway.. It took me far too much time to get a simple find-all working with a regex-comp..got actualy irritated by it because I needed something
quickly.. Spending 1 hour on this isnt realy quick.. anyway.. Is it a bug?