[ale] Yet another regex question

Christopher Fowler cfowler at outpostsentinel.com
Sat Aug 20 07:42:22 EDT 2005


The sample data is at 

http://66.23.198.138:81/meridian.txt


Any line that begins with a '%' is a history report the user told
the switch to print.  Even those this file has line feeds the
software sees a stream.  We are currently in the process of major
modifications to the software to make it handle regex better.


On Fri, 2005-08-19 at 20:59, Joe Knapka wrote:
> Jason Day <jasonday at worldnet.att.net> writes:
> 
> > On Thu, Aug 18, 2005 at 02:40:35PM -0600, Joe Knapka wrote:
> > > Jason Day <jasonday at worldnet.att.net> writes:
> > > > Try "[^ ]?XMI001".  That should match the string "XMI001" optionally
> > > > preceded by any character that is not a space.  If you want to match 0
> > > > or more non-spaces, use "[^ ]*XMI001".
> > > 
> > > But the string "   XMI001" *is* an instance of "XMI001" preceded by
> > > zero non-space characters (and those zero non-spaces are preceded
> > > by some spaces), so would match both of your expressions.
> > 
> > Damn, you're absolutely right.
> > 
> > What about "([^ ]|^)XMI001"?  That should match against a non-space OR
> > the beginning of line (or string) followed by the XMI001.  I know Chris
> > said the regex engine is not seeing the lines, but I'm curious if this
> > would work.
> 
> Yes, it should, I think. I'd like to see an actual sample of the data
> Chris is trying to process.
> 
> -- Joe
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale




More information about the Ale mailing list