EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Help with streamDevice parsing HTML
From: Rod Nussbaumer <[email protected]>
To: Dirk Zimoch <[email protected]>
Cc: [email protected]
Date: Thu, 05 Mar 2009 17:48:18 -0800
Dirk Zimoch wrote:
There was a mistake in my previous mail. You must specify the field in the redirections (usually VAL).

    in "%*/Measure\(PPM\):/%f"
       "%*/Sample flow\(CC\):/%(\$1:FLOW.VAL)f"
       "%*/Scale:/%(\$1:SCALE.VAL)s"
       "%*/System status:/%(\$1:STATUS.VAL)s";

Dirk


Thanks for your help. I do now have a workable solution for this application. It turns out that the application actually does not require the use of regular expressions. However, I am still confused about the syntax used to extract data matching a regex, and especially where there are multiple components to be extracted.

In the example protocol file, there is an entry like:

in "%.1/<TITLE>(.+)<\/TITLE>/";

As I understand it, the notation "%.1" says to use the data matched by the first parenthesized component (ie the TITLE element data). Logically, it follows that one could match a second parenthesized regex component, and assign the matching data to a specified record field. Is this true, and if so, what notation would be used?
An example of this, using HTML again, might be:

<FONT color="black" size="6">

One can devise a regex that matches the two quoted values of the attributes, 'color' and 'size'; something like

/<FONT\s+color="(.+)"\s+size="(.+)">/

which contains two parenthesized parts of the regular expression, and which I might like to assign to separate records. Can this be done, and if so, what notation would be required?

Thanks.

   ---   rod.

Replies:
Re: Help with streamDevice parsing HTML Dirk Zimoch
References:
Help with streamDevice parsing HTML Rod Nussbaumer
Re: Help with streamDevice parsing HTML Dirk Zimoch

Navigate by Date:
Prev: Re: Help with streamDevice parsing HTML Dirk Zimoch
Next: Re: Help with streamDevice parsing HTML Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Help with streamDevice parsing HTML Dirk Zimoch
Next: Re: Help with streamDevice parsing HTML Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·