Re: regex url validator?

2018-10-23 Thread Pi Digital via use-livecode
Hi Alex > Alex wrote: > 1. the syntax diagram is (I think) wrong (or at least misleading) > >> filter [{lines | items | keys | elements} of] *filterSource* {with | without >> | [not] matching} [{wildcard pattern | regex pattern}] *filterPattern* [into >> *targetContainer*] >> > in

Re: regex url validator?

2018-10-23 Thread Monte Goulding via use-livecode
> On 24 Oct 2018, at 9:35 am, Brian Milby via use-livecode > wrote: > > As long as it doesn’t break autocomplete, I think moving the square brackets > is a good idea. It makes it more accurate and clear that wildcard is what can > be optionally omitted but regex must be included. I’m

Re: regex url validator?

2018-10-23 Thread Brian Milby via use-livecode
As long as it doesn’t break autocomplete, I think moving the square brackets is a good idea. It makes it more accurate and clear that wildcard is what can be optionally omitted but regex must be included. Thanks, Brian On Oct 23, 2018, 4:54 PM -0500, Monte Goulding via use-livecode , wrote: >

Re: regex url validator?

2018-10-23 Thread Monte Goulding via use-livecode
> On 24 Oct 2018, at 8:40 am, Monte Goulding via use-livecode > wrote: > > Hmm… the syntax just describes valid syntax rather than how it behaves so I’m > not sure if the change suggested above adds much. > > The docs do state: > > If a regex pattern is specified, the filterPattern

Re: regex url validator?

2018-10-23 Thread Monte Goulding via use-livecode
> On 24 Oct 2018, at 3:29 am, Alex Tweedly via use-livecode > wrote: > > Hi Sean, > > I think there are two (hopefully straightforward) suggestions for the docs on > this: > > 1. the syntax diagram is (I think) wrong (or at least misleading) > >> filter [{lines | items | keys |

Re: regex url validator?

2018-10-23 Thread Tom Glod via use-livecode
thanks Sean and Alex for taking the lead on updating doc..Mark ..lots of examples is great idea. A whole new world has opened up. As a bonus from what I've read filtering using regular expressions are way faster than a repeat over an array. Thanks everyone for helping me out here

Re: regex url validator?

2018-10-23 Thread Mark Wieder via use-livecode
On 10/23/2018 09:29 AM, Alex Tweedly via use-livecode wrote: Hmmm - neither of these descriptions are very clear :-(   but maybe they'll help :-) While it would be good to have the BNF syntax properly coded, I think the most helpful thing would be good examples. And for this complex

Re: regex url validator?

2018-10-23 Thread Alex Tweedly via use-livecode
Hi Sean, I think there are two (hopefully straightforward) suggestions for the docs on this: 1. the syntax diagram is (I think) wrong (or at least misleading) filter [{lines | items | keys | elements} of] *filterSource* {with | without | [not] matching} [{wildcard pattern | regex

Re: regex url validator?

2018-10-23 Thread Sean Cole (Pi) via use-livecode
Tom, I've looked at the docs and I'm not sure how to make it much clearer. Perhaps you have a suggestion? The examples given are: local tVar put the propertyNames into tVar filter tVar with "[az]*" -- tVar contains all property names beginning with a or z This one is NOT a regular expression

Re: regex url validator?

2018-10-23 Thread Sean Cole (Pi) via use-livecode
> > Maybe the documentation needs a tweak. Will do... Sean On Tue, 23 Oct 2018 at 15:04, Tom Glod via use-livecode < use-livecode@lists.runrev.com> wrote: > > > I originally used > > filter the lines of my_container with myregex > > or filter my_container with myregex > > none of the

Re: regex url validator?

2018-10-23 Thread Stephen MacLean via use-livecode
Hi Bob, This function does more than what Tom was asking for, but included it so he could see the entire function. No, rsIsValidEmail_LC isn’t built into LiveCode, it’s part of the rsIsValid suite. Best, Steve > On Oct 23, 2018, at 10:54 AM, Bob Sneidar via use-livecode > wrote: > > This

Re: regex url validator?

2018-10-23 Thread Bob Sneidar via use-livecode
I think the usability of regex for day to day programming can be stated as directly proportional to the percentage of professional software developers (the ones who *actually* make money at it) who could have come up with that regex string purely on their own. Bob S > On Oct 23, 2018, at

Re: regex url validator?

2018-10-23 Thread Brian Milby via use-livecode
Ah... yes if you want to use a regex then you must specify the type of filterPattern using “regex pattern” because if not specified then “wildcard pattern” is assumed. Thanks, Brian On Oct 23, 2018, 9:56 AM -0500, Bob Sneidar via use-livecode , wrote: > I mean AN other function:

Re: regex url validator?

2018-10-23 Thread Bob Sneidar via use-livecode
I mean AN other function: rsIsValidEmail_LC Bob S > On Oct 23, 2018, at 07:54 , Bob Sneidar via use-livecode > wrote: > > This looks like it is dependent on other functions. Are these built into > Livecode?? > > Bob S > > >> On Oct 23, 2018, at 06:26 , Stephen MacLean via use-livecode

Re: regex url validator?

2018-10-23 Thread Bob Sneidar via use-livecode
This looks like it is dependent on other functions. Are these built into Livecode?? Bob S > On Oct 23, 2018, at 06:26 , Stephen MacLean via use-livecode > wrote: > > Hi Tom, > > Don’t know if you found a solution yet, but this is from the rsIsValid suite > I put together a few years back.

Re: regex url validator?

2018-10-23 Thread Bob Sneidar via use-livecode
Start mixing alpha-bits breakfast cereal with their cat food. Worked for me. Bob S > On Oct 23, 2018, at 03:21 , Monte Goulding via use-livecode > wrote: > >> You shouldn't let your cat walk on the keyboard like that. > > Funny thing is my cats are regularly walking on my keyboard while

Re: regex url validator?

2018-10-23 Thread Tom Glod via use-livecode
I originally used filter the lines of my_container with myregex or filter my_container with myregex none of the expressions worked. just blanked out. When I used the same form as Steve...it worked. filter my_container with regex pattern myregex into my_variable So is that a bug in

Re: regex url validator?

2018-10-23 Thread Stephen MacLean via use-livecode
Hi Tom, Don’t know if you found a solution yet, but this is from the rsIsValid suite I put together a few years back. http://forums.livecode.com/viewtopic.php?f=16=26653=138698#p138698 .

Re: regex url validator?

2018-10-23 Thread Monte Goulding via use-livecode
> On 23 Oct 2018, at 4:43 pm, J. Landman Gay via use-livecode > wrote: > > You shouldn't let your cat walk on the keyboard like that. Funny thing is my cats are regularly walking on my keyboard while I’m asleep and usually into the last app I have open which more often than not is the

Re: regex url validator?

2018-10-23 Thread Monte Goulding via use-livecode
> On 23 Oct 2018, at 5:01 pm, Mark Wieder via use-livecode > wrote: > >> Here’s one I have used which seems to work nicely: > > Interesting regex, but always returns true no matter what I throw at it. > Seems that if *any* of the variables are filled (e.g. tPath) then the > matchtext

Re: regex url validator?

2018-10-23 Thread Mark Wieder via use-livecode
On 10/22/2018 07:37 PM, Monte Goulding via use-livecode wrote: Here’s one I have used which seems to work nicely: Interesting regex, but always returns true no matter what I throw at it. Seems that if *any* of the variables are filled (e.g. tPath) then the matchtext function returns true, so

Re: regex url validator?

2018-10-22 Thread J. Landman Gay via use-livecode
You shouldn't let your cat walk on the keyboard like that. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On October 22, 2018 9:40:09 PM Monte Goulding via use-livecode wrote: Here’s one I have used which seems to work nicely:

Re: regex url validator?

2018-10-22 Thread Monte Goulding via use-livecode
Here’s one I have used which seems to work nicely: constant kURLRegex = "^(?:(?:(([^:\/#\?]+:)?(?:(?:\/\/)(?:(?:(?:([^:@\/#\?]+)(?:\:([^:@\/#\?]*))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?" local tOrigin,

regex url validator?

2018-10-22 Thread Tom Glod via use-livecode
Hi peeps, I'm trying to use regex to validate a list of URLs I've tried 4 or 5 different "regular" expressions that supposedly work . but LC does not give me anything back. None of them work, Like for example ... this one.