Let’s try this again... Regex pattern “.*\.(jpe?g|png)$” . - any character * - any number of previous match term ? - 0 or 1 of previous term \. - escapes the period for literal match () - groups terms | - alternates within group $ - end of line
Thanks, Brian On Aug 17, 2018, 8:45 AM -0500, Ralph DiMola via use-livecode <use-livecode@lists.runrev.com>, wrote: > (?i) turn off case sensitivity for everything after it in the regex > expression. (?-i) turns it back on again for everything after it. > > Ralph DiMola > IT Director > Evergreen Information Services > rdim...@evergreeninfo.net > > > -----Original Message----- > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf > Of Brian Milby via use-livecode > Sent: Friday, August 17, 2018 9:19 AM > To: How to use LiveCode > Cc: Brian Milby > Subject: Re: filter list_of_files with REGEX xyz? > > RegEx pattern > Sorry, I was just giving the pattern, not the syntax. > Also, it will probably be case sensitive in that format. I won’t be able to > test until later. I don’t recall the case insensitive flag off hand. > > Thanks, > Brian > On Aug 17, 2018, 8:15 AM -0500, Klaus major-k via use-livecode > <use-livecode@lists.runrev.com>, wrote: > > Hi Brian, > > > > > Am 17.08.2018 um 14:40 schrieb Brian Milby via use-livecode > > > <use-livecode@lists.runrev.com>: > > > > > > Pattern “*.(jpe?g|png|gif)” > > > > thanks, but that does not work!? > > > > I tried: > > on mouseUp pMouseButton > > answer folder "sdsdsdsd" > > put it into tFolder > > put files(tFolder) into tList > > filter tList with pattern "*.(jpe?g|png|gif)" > > answer tList > > end mouseUp > > > > tList = EMPTY, I made of course sure there are JPG, PNG and GIF files in > > that folder. > > > > Same when I use: > > ... > > filter lines of tList with pattern "*.(jpe?g|png|gif)" > > ... > > Any clues? > > > > > Thanks, > > > > You're welcome! :-) > > > > > Brian > > > On Aug 17, 2018, 6:44 AM -0500, Klaus major-k via use-livecode > > > <use-livecode@lists.runrev.com>, wrote: > > > > Hi friends, > > > > > > > > I know how to: > > > > ... > > > > filter list_of_files with "*.jpg" > > > > ... > > > > But REGEX stuff is way over my head. :-/ Can anyone provide the > > > > regex/pattern syntax for filtering jpg, png etc. in ONE run? Know > > > > what I mean? > > > > Best > > > > Klaus > > > > -- > > Klaus Major > > http://www.major-k.de > > kl...@major-k.de > > > > > > _______________________________________________ > > 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