[Pharo-project] gsub like solution for Pharo/Smalltalk

mail list mail.list at ficonab.com
Mon Nov 14 02:25:12 EST 2011


I have  a dictionary of keys and values.

I have a text string in which the keys are marked with before and ending symbols.

In ruby to replace the key with the value in the text string is reasonably simple.  (eg Dictionary.each { key,value | string.gsub!(key,value) }  - or similar to this.

While I don't mind rolling my version of this in Smalltalk, just exploring the regex code and the streams code it is not obvious where is the easiest place to start.

If someone would put their comments on where to start I will build the functionality and put it up on squeaksource since I think it is common requirement.

S.



More information about the Pharo-dev mailing list