[ale] Yet another regex question

Christopher Fowler cfowler at outpostsentinel.com
Sat Aug 13 11:13:38 EDT 2005


On Sat, 2005-08-13 at 10:50 -0400, Geoffrey wrote:
> I guess it might depend on the bigger picture of what you're trying to 
> do.  I assume ABCDEF is just an example.   Do you want to exlude 
> ANYTHING that is prefixed by '% ' ?
> 

Nope.  We basically look at a Meridian Console PBX.  It will display
strings of data as alarms 'XMI001' for example is that a card has been
pulled.  If you tell the Meridian to display a history report it will
prefix all alarms that have occurred with '%\s'.  This is so devices
that do alarm monitoring do not catch it.  

Well, we catch it.  The reason we catch it is that we were telling the
regex engine to simply look for 'XMI001' in the stream.  The parser
seems to see a stream of data and not lines.  So what I'm basically
trying to do is tell the parser to catch 'XMI001' only then it does not
have the '%\s' prefix.

The Meridian has thousands of possible alarms.  We only have a list of
100 that we must search for so I need to switch them from a string to
regex expressions.  Unfortunately we can only tell the program what to
look for and not what to ignore.  If we could tell it to ignore '%\s'
then this problem would be over.  So we are trying to figure out a regex
that will catch 'AMH002' and not '% AMH002'.  Only AMH002 when its not
preceded with a '% '





More information about the Ale mailing list