POV-Ray : Newsgroups : povray.off-topic : RegEx help : Re: RegEx help Server Time
4 Sep 2024 05:18:16 EDT (-0400)
  Re: RegEx help  
From: Chambers
Date: 9 May 2010 23:45:00
Message: <web.4be780c014fb0cf2e79f0df40@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Chambers wrote:
> > Any tips as to what I'm doing wrong?
>
> Firstly, which regexp engine are you using? They're all slightly different.

I'm using grep, but I don't know what version.  It's a virtual linux machine
that I access via a web browser for labs for class... I could do a local
install, but it wouldn't have the files we're supposed to work with.

> Second, if you want to search for a literal period, probably \. is better
> than [.].

That's what I would have thought, but I found that \. didn't return any matches,
whereas [.] did.  Probably a quirk of the version I was using.

> In other words, the problem is not so much with your regular expression as
> it is with expression the right regular expression to the RE interpreter
> you're using. What you're searching for ought to work, so the problem is
> either (1) you have spaces between the period and end of line, or (2) you
> are not passing the string to the RE engine that ends with "end of line"
> match marker.

Thanks, I turned in my lab report with what I thought should work, and noting
that it didn't.  That was the only problem with it, so I doubt I'll lose too
many points.

....Chambers


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.