[GRASS-user] g.mlist with logical operators?

Hamish hamish_b at yahoo.com
Tue Feb 14 14:08:17 EST 2012


Johannes wrote:
> I'd like to list (using g.list) all raster maps
> that start with rast_* but not those which start with
> rast_A_* OR rast_B_* OR rast_C_*. I tried to use the
> OR operator and | but without success so far.
> Are such logical operators generally applicable with
> g.mlist?

yes, the the basic or extended regex flags you can do pretty much any
pattern matching you can think of.

try like rast_[^A-C][^_]


see http://www.regular-expressions.info/
(it is well worth anyone's time to spend a few hours learning a bit of
regex, the payback in saved time is enormous)


Hamish


More information about the grass-user mailing list