search an expression with an opening left bracket : "("

Roland Illig roland.illig at gmx.de
Sat Sep 25 10:22:06 UTC 2004


sting sting wrote:
> Hello,
> 
> I am trying to perform a search in mc like thus:
> I am looking for all files which have an occurrence of the follwoing 
> text: my_method(
> 
> (with the left bracket)
> Command->FindFile
> 
> In the content I put the follwing:
> my_method(
> 
> 
> I get a red popup saying:
> Malformed regular expression.
> 
> Is there a way to perform such a search in MC ?

Yes, there is. Just escape the ( with a \, that is search for 
"my_method\(". You are expected to enter a "regular expression" here.
Google for it and you will find it to be very powerful.

For example you can search for my_method[ ]*\( to search for the string 
my_method, followed by any number of spaces (in the brackets are the 
allowed characters, the * after the closing bracket means "0 or more") 
followed by an opening parenthesis.

I'll have a look to improve this behaviour. Either I write it somewhere 
in the dialog that a regular expression is expected or I let the user 
select whether {s,}he wants to
   [ ] do a regular expression search.

Roland



More information about the mc mailing list