Re: [ROOT] Regular expression in string

From: Elias Athanasopoulos (
Date: Thu Aug 19 2004 - 16:51:23 MEST

Hi Stilianos,

On Thu, Aug 19, 2004 at 12:53:31PM -0500, Stilianos Kesisoglou wrote:
> Hi,
> The TString class has a nice feature which is the detection
> of a regular expression within a string:

Just to mention that the ROOT Ruby module supports natively (via Ruby) 
regular expressions. A small example:

require 'libRuby'

graphs = ["Main Plot", "Background Plot", "Noise Plot"]

graphs.each do |g|
    if g =~ /^Main/
        # Draw main plot here...
        main ="main", g, 10, 10, 400, 400)
        # ...


University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 


This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET