grep("", "/^\s*$/","r") returns [] instead of 1 ("*" stands for 0 to any number of \s)
Reported by Samuel GOUGEON (@sgougeon)
Originally assigned to Pierre-Aime AGNEL
BUG DESCRIPTION:
----------------
grep("", "/^$/","r") also returns []
ERROR LOG:
----------
none. Wrong bahavior
HOW TO REPRODUCE THE BUG:
-------------------------
mytext = "";
grep(mytext, "/^\s*$/","r")~=[]
grep(mytext, "/^*$/","r")~=[]
// should return %t
OTHER INFORMATION:
------------------
-->grep(" ", "/^\s*$/","r")
ans =
1.
Detects correctly any blank text
workaround to detect empty text in addition:
mytext==""