in reply to Re: Re: Re: How to identify invalid reg. expr.?
in thread How to identify invalid reg. expr.?
As far as what you can do - don't accept a regex from an untrusted user. I don't believe there's any way to fully validate the friendliness of a regex. Maybe you could offer your users a set of pre-canned searchs "full-word search", "phrase search", "starts with", "ends with", etc. Then use the input to build the appropriate regex with \Q$term\E to quarantine the input.
-sam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to identify invalid reg. expr.?
by Smylers (Pilgrim) on Jun 06, 2002 at 12:13 UTC | |
by mephit (Scribe) on Jun 06, 2002 at 19:44 UTC |