OT: need advice with regex

Thierry Douez th.douez at gmail.com
Thu Jul 19 06:09:48 EDT 2012


on mouseUp

   put "Enjoy the sunny days [at least in my place] :)" into tfilter

   put replacetext(tFilter,"\[.*\]","(done)") into tfilter

   put tfilter

end mouseUp

Thierry


2012/7/19 Tiemo Hollmann TB <toolbook at kestner.de>

> Hi,
>
> I want to replace a string with an opening and closing square bracket and
> any sign in between with three question marks, like this
>
> put replacetext(tFilter,"[?]","???") into tFilter
>
> I tried to escape the square brackets like this:
>
> put replacetext(tFilter,"\[?\]","???") into tFilter
>
> and get as a result in tFilter only the second bracket replaced.
>
> What am I doing wrong? Thank you
>
> Tiemo
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list