Skip to main content.
home | support | download

Back to List Archive

Re: Fun with ? _ in ExtractPath

From: Bill Moseley <moseley(at)>
Date: Thu Oct 28 2004 - 21:42:53 GMT
On Thu, Oct 28, 2004 at 02:28:50PM -0700, Bill Conlon wrote:
> ExtractPath uid1 remove /?
> I get a segmentation fault -- ./swish-index: line 5:  1503 Segmentation 
> fault

That's interesting.  The problem is that it's causing a loop in the
regex code.

Did you try and backslash it?  A question mark is a special character.

Maybe if you use the -T regex option to watch the pattern matching you
might get some ideas.

Let me see...  Oh a quick trip thorugh man 7 regex

   ExtractPath uid1 regex !^.+uid1=([0-9]+)!$1!

The trick to figuring this stuff out is to start simple and work back.

I did this:

  $ cp 1.html 'foo_bar?uid1=9999'

then I had a file to test against.  Then I used that EXACT pattern in
my regex:

    ExtractPath uid1 regex !^foo_bar?uid1=(9999)$!$1!

once I saw that work it was just a few modifications.

Bill Moseley

Unsubscribe from or help with the swish-e list:

Help with Swish-e:
Received on Thu Oct 28 14:42:54 2004