Re: Weirdness with filter (maybe?)

2017-04-20 Thread hh via use-livecode
There is also brilliant work optimized for LC syntax.
By the one and only LC-master of regex, Thierry:

https://sunny-tdz.com/livecode/sunnyrex

> Bob S. wrote:
> Filter, unlike matchtext, in the form you are using, is not using regex. 
> There is a form of
> filter however that does. If you need help with a regex expression, I use a 
> neat little tool
> called RegexMagic. 30 day demo and not too expensive if you use regex 
> expressions on a regular
> basis. (See what I did there?) 


___
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: Weirdness with filter (maybe?)

2017-04-20 Thread Bob Sneidar via use-livecode
Filter, unlike matchtext, in the form you are using, is not using regex. There 
is a form of filter however that does. If you need help with a regex 
expression, I use a neat little tool called RegexMagic. 30 day demo and not too 
expensive if you use regex expressions on a regular basis. (See what I did 
there?) 

Bob S


> On Apr 20, 2017, at 03:20 , Alan via use-livecode 
>  wrote:
> 
> Try
> 
> filter lines of MyList with ("*" & CharStringX & "*" & tab & "*")
> 
> to get all lines where CharStringX is contained in the first part of the 
> string before the tab.
> 
> 
>> filter lines of MyList with ("*" & CharStringX & "*" & tab)
> 
> HTH
> 
> cheers
> 
> Alan
> ___
> 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: Weirdness with filter (maybe?)

2017-04-20 Thread Alan via use-livecode
Try

filter lines of MyList with ("*" & CharStringX & "*" & tab & "*")

to get all lines where CharStringX is contained in the first part of the string 
before the tab.


> filter lines of MyList with ("*" & CharStringX & "*" & tab)

HTH

cheers

Alan
___
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: Weirdness with filter (maybe?)

2017-04-20 Thread Alex Tweedly via use-livecode

I think it should be

 filter lines of MyList with (charStringX & TAB & *)

i.e. get lines containing this string X followed by TAB followed by anything

Alex

On 20/04/2017 09:22, Quentin Long via use-livecode wrote:

I have a return-delimited list. Each line of this list consists of [some text] & 
tab & [other text]. I want to see all the lines of the list for which [some text] 
contains Character String X. This is obviously a job for the filter command, right? So 
I try this:

filter lines of MyList with ("*" & CharStringX & "*" & tab)

The result I'm expecting is, a list which contains every line of MyList in 
which the [some text] bit contains CharStringX.

The result I get is, a "list" which contains zero lines.

Have tried various alternate forms of the line, including…

filter lines of MyList with ("*" & CharStringX & "*" & numToChar (9))
filter lines of MyList with wildcard pattern ("*" & CharStringX & "*" & tab)
filter lines of MyList matching wildcard pattern ("*" & CharStringX & "*" & tab)

…all of which yield the same results as the original line.

Would appreciate a sanity check: Am I missing some necessary part of the filter syntax? 
Does the filter command even know what to do with the constant "tab"? How 
*does* one filter for a pattern that includes a tab?


"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length"
 
Read the webcomic at [ http://www.atarmslength.net ]!
 
If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ].


___
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

Weirdness with filter (maybe?)

2017-04-20 Thread Quentin Long via use-livecode
I have a return-delimited list. Each line of this list consists of [some text] 
& tab & [other text]. I want to see all the lines of the list for which [some 
text] contains Character String X. This is obviously a job for the filter 
command, right? So I try this:

filter lines of MyList with ("*" & CharStringX & "*" & tab)

The result I'm expecting is, a list which contains every line of MyList in 
which the [some text] bit contains CharStringX.

The result I get is, a "list" which contains zero lines.

Have tried various alternate forms of the line, including…

filter lines of MyList with ("*" & CharStringX & "*" & numToChar (9))
filter lines of MyList with wildcard pattern ("*" & CharStringX & "*" & tab)
filter lines of MyList matching wildcard pattern ("*" & CharStringX & "*" & tab)

…all of which yield the same results as the original line.

Would appreciate a sanity check: Am I missing some necessary part of the filter 
syntax? Does the filter command even know what to do with the constant "tab"? 
How *does* one filter for a pattern that includes a tab?

   
"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length"

Read the webcomic at [ http://www.atarmslength.net ]!

If you like "At Arm's Length", support it at [ 
http://www.patreon.com/DarkwingDude ].

___
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