Bad regex?
Set rm=##class(%Regex.Matcher).%New("[0-9]*","Word 123456")
Write rm.ReplaceAll(".")
.W.o.r.d. ..Why??
Discussion (4)2
Comments
Could you explain what you wanted to achieve?
What are you trying to do? This?
USER>Set rm=##class(%Regex.Matcher).%New("[0-9]","Word 123456")
USER>Write rm.ReplaceAll(".")
Word ......Or:
USER>Set rm=##class(%Regex.Matcher).%New("[0-9]+","Word 123456")
USER>Write rm.ReplaceAll(".")
Word .Sorry, [0-9]+ indeed (I was testing with GNU grep -o with '*' and results are the same).
Thanks