Feature request: support regular expressions

From: John E. Davis <davis_at_email.domain.hidden>
Date: Fri, 18 Aug 2006 14:03:11 -0400
Hi,

It would be useful for set_par to support regular expressions for the
parameter names.  For example, I have a model with a number of kernel
parameters with names such as

 "gpileup_n(1).G0_0"
 "gpileup_n(1).G0_1"
 "gpileup_n(2).G0_0"
 "gpileup_n(2).G0_1"
     .
     .

If regular expressions were supported, I would be able to use set_par
to set all the G0_0 parameters to a specified value, e.g.,

 isis> set_par ("^gpileup_n(.)\\.G0_0$", 0.5);
 isis> set_par (".*G0_1$", 2.1);

The question is how would set_par know if the first parameter is a
regular expression.  I suggest that if a regular expression is to
be used, then it must either begin with '^' or end with '$'.

Finally, some users might prefer glob expressions over regular
expressions.  The "glob" equivalents to the above are:

 isis> set_par ("^gpileup_n(?).G0_0", 0.5);
 isis> set_par ("^*.G0_1", 2.1);

(Note the presence of ^ to indicate the string represents a pattern).

Thanks,
--John


 
----
You received this message because you are
subscribed to the isis-users list.
To unsubscribe, send a message to
isis-users-request_at_email.domain.hiddenwith the first line of the message as:
unsubscribe
Received on Fri Aug 18 2006 - 14:21:09 EDT

This archive was generated by hypermail 2.3.0 : Fri May 02 2014 - 08:35:44 EDT