Re: am I regexing by mistake?
I will need to verify, but ‘?’ should match exactly one character, so Thanks, Brian On Sep 2, 2018, 3:44 AM -0500, David V Glasgow via use-livecode , wrote: > For the record, this was my stupidity, nothing to do with escaping wildcards. > Filter lines doesn’t treat a question mark as anything but text. > > The script I posted didn’t find 'asl?’ because I forgot to pre- and post- > pend an asterisk before filtering. So, connected to wildcards, but I was > definitely barking up the wrong tree. > > Cheers, > > David G > > > On 31 Aug 2018, at 3:35 pm, Brian Milby via use-livecode > > wrote: > > > > Need to put question mark in brackets “[?]” when using wildcard filters if > > you want to match a literal question mark. Otherwise it signifies a single > > character match to anything. > > > > Thanks, > > Brian > > On Aug 31, 2018, 9:12 AM -0500, David V Glasgow via use-livecode > > , wrote: > > > Hello, folks. > > > > > > I am undertaking keyword searches of chat logs. The keywords are stored > > > as themed lists in fields. > > > > > > One of the things I am interested in is finding lines where one > > > contributor asks another about where they live, shop, go to school etc > > > etc. So, (among other phrases) I filter for lines in the text containing > > > the acronym “ asl ” (nowhere are quotes actually included in fields or > > > variables, they’re just in this mail). I pad with spaces so as not to > > > find “asleep”. I also want to find “asl?” > > > > > > So I repeat through lines of the keyword field “location" > > > > > > Filter lines of tsource with tpattern > > > > > > … which works for everything except fails to match “asl?”. It occurred to > > > me that perhaps the question mark is being interpreted as a regex symbol, > > > so I tried changing the line in the field to read “ asl/?”, but that > > > doesn’t find the “asl?” that I can see in the third line of the text to > > > be searched…. > > > > > > > > > shadownave (09/16/14 1:44:58 AM): hey care to chat > > > shadownave (09/16/14 1:45:09 AM): hey care to chat > > > what_sez_moo (09/16/14 1:45:18 AM): sure asl? > > > what_sez_moo (09/16/14 1:45:52 AM): 13 / F / Ashton here > > > shadownave (09/16/14 1:51:00 AM): 25/m/Derby > > > shadownave (09/16/14 1:51:03 AM): how r u tonight > > > what_sez_moo (09/16/14 1:51:16 AM): bored. > > > > > > > > > What am I doing wrong? Is this something to do with regex? > > > > > > Oh yes, and I thought there might be invisible characters messing things > > > up, so I exported source text as plain text from BBedit, with no > > > improvement. > > > > > > best wishes > > > > > > David Glasgow > > > ___ > > > 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 > > > ___ > 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: am I regexing by mistake?
For the record, this was my stupidity, nothing to do with escaping wildcards. Filter lines doesn’t treat a question mark as anything but text. The script I posted didn’t find 'asl?’ because I forgot to pre- and post- pend an asterisk before filtering. So, connected to wildcards, but I was definitely barking up the wrong tree. Cheers, David G > On 31 Aug 2018, at 3:35 pm, Brian Milby via use-livecode > wrote: > > Need to put question mark in brackets “[?]” when using wildcard filters if > you want to match a literal question mark. Otherwise it signifies a single > character match to anything. > > Thanks, > Brian > On Aug 31, 2018, 9:12 AM -0500, David V Glasgow via use-livecode > , wrote: >> Hello, folks. >> >> I am undertaking keyword searches of chat logs. The keywords are stored as >> themed lists in fields. >> >> One of the things I am interested in is finding lines where one contributor >> asks another about where they live, shop, go to school etc etc. So, (among >> other phrases) I filter for lines in the text containing the acronym “ asl ” >> (nowhere are quotes actually included in fields or variables, they’re just >> in this mail). I pad with spaces so as not to find “asleep”. I also want to >> find “asl?” >> >> So I repeat through lines of the keyword field “location" >> >> Filter lines of tsource with tpattern >> >> … which works for everything except fails to match “asl?”. It occurred to me >> that perhaps the question mark is being interpreted as a regex symbol, so I >> tried changing the line in the field to read “ asl/?”, but that doesn’t find >> the “asl?” that I can see in the third line of the text to be searched…. >> >> >> shadownave (09/16/14 1:44:58 AM): hey care to chat >> shadownave (09/16/14 1:45:09 AM): hey care to chat >> what_sez_moo (09/16/14 1:45:18 AM): sure asl? >> what_sez_moo (09/16/14 1:45:52 AM): 13 / F / Ashton here >> shadownave (09/16/14 1:51:00 AM): 25/m/Derby >> shadownave (09/16/14 1:51:03 AM): how r u tonight >> what_sez_moo (09/16/14 1:51:16 AM): bored. >> >> >> What am I doing wrong? Is this something to do with regex? >> >> Oh yes, and I thought there might be invisible characters messing things up, >> so I exported source text as plain text from BBedit, with no improvement. >> >> best wishes >> >> David Glasgow >> ___ >> 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 ___ 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: am I regexing by mistake?
Ah! So its just a wildcard! Brilliant. Why didn’t I think of that? I was wrongly barking up the Regex tree, and making things more complicated than needed. Thank you Brian. Cheers David G > On 31 Aug 2018, at 3:35 pm, Brian Milby via use-livecode > wrote: > > Need to put question mark in brackets “[?]” when using wildcard filters if > you want to match a literal question mark. Otherwise it signifies a single > character match to anything. > > Thanks, > Brian > On Aug 31, 2018, 9:12 AM -0500, David V Glasgow via use-livecode > , wrote: >> Hello, folks. >> >> I am undertaking keyword searches of chat logs. The keywords are stored as >> themed lists in fields. >> >> One of the things I am interested in is finding lines where one contributor >> asks another about where they live, shop, go to school etc etc. So, (among >> other phrases) I filter for lines in the text containing the acronym “ asl ” >> (nowhere are quotes actually included in fields or variables, they’re just >> in this mail). I pad with spaces so as not to find “asleep”. I also want to >> find “asl?” >> >> So I repeat through lines of the keyword field “location" >> >> Filter lines of tsource with tpattern >> >> … which works for everything except fails to match “asl?”. It occurred to me >> that perhaps the question mark is being interpreted as a regex symbol, so I >> tried changing the line in the field to read “ asl/?”, but that doesn’t find >> the “asl?” that I can see in the third line of the text to be searched…. >> >> >> shadownave (09/16/14 1:44:58 AM): hey care to chat >> shadownave (09/16/14 1:45:09 AM): hey care to chat >> what_sez_moo (09/16/14 1:45:18 AM): sure asl? >> what_sez_moo (09/16/14 1:45:52 AM): 13 / F / Ashton here >> shadownave (09/16/14 1:51:00 AM): 25/m/Derby >> shadownave (09/16/14 1:51:03 AM): how r u tonight >> what_sez_moo (09/16/14 1:51:16 AM): bored. >> >> >> What am I doing wrong? Is this something to do with regex? >> >> Oh yes, and I thought there might be invisible characters messing things up, >> so I exported source text as plain text from BBedit, with no improvement. >> >> best wishes >> >> David Glasgow >> ___ >> 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 ___ 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: am I regexing by mistake?
Need to put question mark in brackets “[?]” when using wildcard filters if you want to match a literal question mark. Otherwise it signifies a single character match to anything. Thanks, Brian On Aug 31, 2018, 9:12 AM -0500, David V Glasgow via use-livecode , wrote: > Hello, folks. > > I am undertaking keyword searches of chat logs. The keywords are stored as > themed lists in fields. > > One of the things I am interested in is finding lines where one contributor > asks another about where they live, shop, go to school etc etc. So, (among > other phrases) I filter for lines in the text containing the acronym “ asl ” > (nowhere are quotes actually included in fields or variables, they’re just in > this mail). I pad with spaces so as not to find “asleep”. I also want to find > “asl?” > > So I repeat through lines of the keyword field “location" > > Filter lines of tsource with tpattern > > … which works for everything except fails to match “asl?”. It occurred to me > that perhaps the question mark is being interpreted as a regex symbol, so I > tried changing the line in the field to read “ asl/?”, but that doesn’t find > the “asl?” that I can see in the third line of the text to be searched…. > > > shadownave (09/16/14 1:44:58 AM): hey care to chat > shadownave (09/16/14 1:45:09 AM): hey care to chat > what_sez_moo (09/16/14 1:45:18 AM): sure asl? > what_sez_moo (09/16/14 1:45:52 AM): 13 / F / Ashton here > shadownave (09/16/14 1:51:00 AM): 25/m/Derby > shadownave (09/16/14 1:51:03 AM): how r u tonight > what_sez_moo (09/16/14 1:51:16 AM): bored. > > > What am I doing wrong? Is this something to do with regex? > > Oh yes, and I thought there might be invisible characters messing things up, > so I exported source text as plain text from BBedit, with no improvement. > > best wishes > > David Glasgow > ___ > 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
am I regexing by mistake?
Hello, folks. I am undertaking keyword searches of chat logs. The keywords are stored as themed lists in fields. One of the things I am interested in is finding lines where one contributor asks another about where they live, shop, go to school etc etc. So, (among other phrases) I filter for lines in the text containing the acronym “ asl ” (nowhere are quotes actually included in fields or variables, they’re just in this mail). I pad with spaces so as not to find “asleep”. I also want to find “asl?” So I repeat through lines of the keyword field “location" Filter lines of tsource with tpattern … which works for everything except fails to match “asl?”. It occurred to me that perhaps the question mark is being interpreted as a regex symbol, so I tried changing the line in the field to read “ asl/?”, but that doesn’t find the “asl?” that I can see in the third line of the text to be searched…. shadownave (09/16/14 1:44:58 AM): hey care to chat shadownave (09/16/14 1:45:09 AM): hey care to chat what_sez_moo (09/16/14 1:45:18 AM): sure asl? what_sez_moo (09/16/14 1:45:52 AM): 13 / F / Ashton here shadownave (09/16/14 1:51:00 AM): 25/m/Derby shadownave (09/16/14 1:51:03 AM): how r u tonight what_sez_moo (09/16/14 1:51:16 AM): bored. What am I doing wrong? Is this something to do with regex? Oh yes, and I thought there might be invisible characters messing things up, so I exported source text as plain text from BBedit, with no improvement. best wishes David Glasgow ___ 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