Re: Filter and the Question Mark (escaping ? in regex)
It's a pity filter doesn't support a more complete regex pattern. On 24/01/2013, at 8:18 PM, Thierry Douez wrote: > Wrong because regex inside Livecode behave sometimes in strange ways... -- Monte Goulding M E R Goulding - software development services mergExt - There's an external for that! ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Filter and the Question Mark (escaping ? in regex)
Hi Bob, You are wrong and right :) Right because that's how regex works in most environment. Wrong because regex inside Livecode behave sometimes in strange ways... Anyway, be happy. Thierry 2013/1/23 Robert Sneidar > I mean Thierry > > > I just checked this, and Malte is correct. I see now why the second > example would only select lines ending in ?. I should probably remove > "expert in regex" from my resume? ;-) > > > > Bob > > > > > > On Jan 23, 2013, at 3:30 AM, Thierry Douez wrote: > > > >> Hi Malte, > >> > >> for any position of ? in a line: filter tText with "*[?]*" > >> > >> for the last char of a line: filter tText with "*[?]" > >> > >> Regards, > >> Thierry > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Filter and the Question Mark (escaping ? in regex)
I mean Thierry > I just checked this, and Malte is correct. I see now why the second example > would only select lines ending in ?. I should probably remove "expert in > regex" from my resume? ;-) > > Bob > > > On Jan 23, 2013, at 3:30 AM, Thierry Douez wrote: > >> Hi Malte, >> >> for any position of ? in a line: filter tText with "*[?]*" >> >> for the last char of a line: filter tText with "*[?]" >> >> Regards, >> >> Thierry > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Filter and the Question Mark (escaping ? in regex)
I just checked this, and Malte is correct. I see now why the second example would only select lines ending in ?. I should probably remove "expert in regex" from my resume? ;-) Bob On Jan 23, 2013, at 3:30 AM, Thierry Douez wrote: > Hi Malte, > > for any position of ? in a line: filter tText with "*[?]*" > > for the last char of a line: filter tText with "*[?]" > > Regards, > > Thierry > > > 2013/1/23 Malte Brill > >> Hi, >> >> I got a var tText that contains: >> >> asdf >> jkl? >> bcdk >> >> I want to do something like this >> >> filter tText with "*\?*" >> >> which should leave me with only jkl?. >> >> > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Filter and the Question Mark (escaping ? in regex)
It's my understanding that * means 0 to any number of characters, in which case these are both the same thing. I might be wrong though. Might explain why some of my filtering is not working as expected. :-) Bob On Jan 23, 2013, at 3:30 AM, Thierry Douez wrote: > Hi Malte, > > for any position of ? in a line: filter tText with "*[?]*" > > for the last char of a line: filter tText with "*[?]" > > Regards, > > Thierry > > > 2013/1/23 Malte Brill > >> Hi, >> >> I got a var tText that contains: >> >> asdf >> jkl? >> bcdk >> >> I want to do something like this >> >> filter tText with "*\?*" >> >> which should leave me with only jkl?. >> >> > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Filter and the Question Mark (escaping ? in regex)
Hi Malte, for any position of ? in a line: filter tText with "*[?]*" for the last char of a line: filter tText with "*[?]" Regards, Thierry 2013/1/23 Malte Brill > Hi, > > I got a var tText that contains: > > asdf > jkl? > bcdk > > I want to do something like this > > filter tText with "*\?*" > > which should leave me with only jkl?. > > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Filter and the Question Mark (escaping ? in regex)
Malte, Try this: filter tText with "*[?]*" Kind regards, Mark On 1/23/2013 11:49 AM, Malte Brill wrote: Hi, I got a var tText that contains: asdf jkl? bcdk I want to do something like this filter tText with "*\?*" which should leave me with only jkl?. This does not appear to work. Any pointers on how to correctly escape the question mark greatly appreciated. Cheers, Malte ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Filter and the Question Mark (escaping ? in regex)
Hi, I got a var tText that contains: asdf jkl? bcdk I want to do something like this filter tText with "*\?*" which should leave me with only jkl?. This does not appear to work. Any pointers on how to correctly escape the question mark greatly appreciated. Cheers, Malte ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode