Escaping the Filter command's wildcards
m.schonewille at economy-x-talk.com
Wed May 22 20:32:42 EDT 2013
I see what you mean. You weren't looking for a solution, just for more
I tried several special characters and they can all be used to filter
lines with the same workaround. Unfortunately, many of those special
characters have no effect, because regex isn't fully supported by the
filter command, as Pete mentioned already. Therefore I wonder why we
need to escape the question mark. That seems inconsistent to me.
Economy-x-Talk Consulting and Software Engineering
Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com
Buy my new book "Programming LiveCode for the Real Beginner"
On 5/23/2013 01:26, Paul Dupuis wrote:
> On 5/22/2013 5:37 PM, Mark Schonewille wrote:
>> Hi Paul,
>> This works fine for me:
>> put replacetext("xxx?!xxx","[\?!]","")
>> --> xxxxxx
>> What exactly is the problem you're having? Could you post some of the
>> code that doesn't work for you?
> it is with the filter command not the replaceText function I ran into a
> If you have a variable tSource with following 3 lines:
> and filter tSource with "sometext?" you get all 3 lines instead of just
> the one with the ? at the end.
> filter tSource with "sometext[?]" filters to just the expected line, so
> that is a work-around to solve what I needed to do.
> I was surprised that filter tSource with "sometext\?" did NOT work
> (since that would have been a valid regex pattern to filter to just the
> line with the ?). However the experience made me curious as to what
> other inconsistencies with the filter command folks may have uncovered.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode