Apache OpenOffice (AOO) Bugzilla – Issue 15070
"Find and replace" bug using a wildcard
Last modified: 2003-09-08 16:56:16 UTC
I type for instance the word Isabug and do Edit/Find and replace/Regular expressions/Search for a*g as said in the help to get "abug". But I only get the final g. (It does not depend on the word used)
Indeed (g) is the correct result when searching for (a*g) in 'Isabug' because (a*) means _zero_ or more times _a_. Valid results for (a*g) in general would be g, ag, aag, aaag and so on. If you want to find 'abug' use 'a.*g' instead. This will search for a string that begins with an 'a' followed by zero or more other chars and ending with 'g'. The dot (.) acts as a wildcard for a single char. (like ? in DOS) So (.*) in regular expressions has the same meaning as (*) in DOS. Resolving as invalid.
.