On 12/13/06, benjohn / fysh.org <benjohn / fysh.org> wrote:
[snip]
> I want something that acts as an abstract machine for finding things in
> a string (in this case variables, but the rules could be more complex).
> One should be able to use this machine without knowing what it finds, or
> how it finds. All I should need to know is that it finds things. I'm
> trying to understand if regexps are able to do this - to provide this
> separation. Perhaps they don't, which is fine. I'd just like to know if
> they do or not, or if they do a bit, how much.

In a language like ruby, its not possible to distinguish between
a variablename or a methodname by just looking at the name.
Regexp just looks at the name.

If you want to replace a variable-name then you need to
parse the code.

-- 
Simon Strandgaard
http://opcoders.com/