Re: Escaping text for the regular expression compiler

"Bernd Schoeller" <[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Organization ETH Zurich
Message-ID <[email protected]>
On Thu, 02 Nov 2006 06:30:22 +0100, Berend de Boer <[email protected]>  
wrote:

>>>>>> "Paul" == Paul Bates [ES] <Paul> writes:
>
>     Paul> Does Gobo contain a function for escaping a STRING so it may
>     Paul> be passed as part of a complete expression, without being an
>     Paul> expression itself, to the regex parser?
>
> Not aware of one. You should be able to do that with a regexp, but I
> wouldn't be able to give you a complete regexp to do so.
>
> But perhaps you can google for a regexp to escape a possible regepx
> and submit code or email a link so we can put that in Gobo? Sounds  
> useful.

In general, escaping is a needed functionality for many applications  
(specially in web based applications to prevent code injection). Escaping  
must be used any time we generate code for an other language. There should  
be escaping functionality for things like:

- Regexp
- HTML / XML
- SQL (including different dialects like for MySQL)
- JavaScript
- C
- Eiffel

and perhaps for Python, Bash, .bat, ...

You are right that this all could be done using regular expressions, I  
just want to suggest that any solution should try to be a little more  
general that just escaping for regexps.

Bernd


To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gobo-eiffel/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/gobo-eiffel/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.