Page 193 of 237

Re: [Script] WME Validator 1.1.4 / 07.11.2014

PostPosted: Tue Nov 11, 2014 9:40 pm
by sketch
They're working fine in beta, but not in production. Weird. I reinstalled Validator, still the same.

Re: [Script] WME Validator 1.1.4 / 07.11.2014

PostPosted: Wed Nov 12, 2014 2:38 am
by sketch
...You know, I think that might be what it was. I filtered all the checks but one custom check to look for negative elevations back home. Maybe I forgot to take that out. Crap.

I'll never know for sure, since I deleted the localstorage key and started from scratch :D

Re: [Script] WME Validator 1.1.4 / 07.11.2014

PostPosted: Thu Nov 13, 2014 6:30 pm
by sketch
Olestas wrote:Wow, now can buttons be added to disable/enable custom checks? :D

It's really easy to do this, one way is to do the "!128" or whatever the number is, but the easier way is just to insert a space or some other character in the regex or template field to break the check :D

Re: [Script] WME Validator 1.1.6 / 06.01.2015

PostPosted: Wed Feb 25, 2015 8:19 pm
by sketch
PesachZ wrote:
ispyisail wrote:Hi guys

Its not working as expected

Cut and paste from validator just in case

Code: Select all
${typeRank}:${street}
/^1[01]:.*( [a-z)|([A-Z]{2})


It picked up many road but not what i was after

examples

Crawford Rd
Fonterra Te Rapa
Piwakawaka Court
Arncliffe Tce

Thoughts?

Thanks

Missing closing square bracket

I think this is looking for any road type 10 or 11, which has in the name a string of space, followed by two characters which be any lowercase or uppercase, or parentheses or a pipe or opening square bracket. Basically I think it is matching any two consecutive letters "case insensitive" or any of the following [()|

Regardless of what exactly it is matching try this to fix it. This still only looks for matches on road type 10 or 11

Code: Select all
${typeRank}:${street}
/^1[01]:.*( [a-z])|([A-Z]{2})

Sent using Tapatalk for Android 4.4.2

You got too many parentheses in there. Do this:
Code: Select all
${typeRank}:${street}
/^1[01]:.*( [a-z]|[A-Z]{2})

Options work like this (option 1|option 2), not like this (option 1)|(option 2).

Re: [Script] WME Validator 1.1.6 / 06.01.2015

PostPosted: Wed Feb 25, 2015 9:18 pm
by sketch
This is what I have written down. I haven't verified or updated it recently. For example, you can see that Ferry isn't in there.
Code: Select all
typeRank
15 freeway
14 major highway
13 minor highway
12 ramp
11 primary street
10 street
9 service road
8 dirt road
7 parking lot road
6 private road
5 walking trail
4 pedestrian bdwk
3 stairway
2 railroad
1 runway


type
1 street
2 primary street
3 freeway
4 ramp
5 walking trail
6 major hwy
7 minor hwy
8 dirt
9
10 ped boardwalk
11
12
13
14
15
16 stairway
17 private road
18 railroad
19 runway
20 parking lot road
21 service road

Re: [Script] WME Validator 1.1.6 / 06.01.2015

PostPosted: Thu Feb 26, 2015 1:25 am
by sketch
Service roads SHOULD have all been converted to Street, so if there are some that are now (null), that's weird. Anyway, that's another thing that shows that I haven't messed with it in a while :)

edit

SuperDave1426 wrote:So, no word on why when looking for ${typeRank} values that used to highlight Private, PLR & Dirt Roads no longer works?

They work for me. I just tested them all, and all are working, except that Service Road no longer exists, of course.

---

The ${type} number for Ferry is 14. Ferry does not appear to have a typeRank.

Re: [Script] WME Validator 1.1.6 / 06.01.2015

PostPosted: Thu Feb 26, 2015 6:01 pm
by sketch
voludu2 wrote:SuperDave, is this Mall in Reno within your editable area?
Validator is designed to only check segments you can edit.

Just for you, I strove to test this properly, in a way that anyone can replicate:

HOW I TESTED
I disabled EVERY WME script other than validator. I picked a reproducible PL from your image: https://www.waze.com/editor/?env=usa&lo ... s=74223083


And I constructed a typeRank filter to highlight every road with a numeric typeRank
${typeRank}
/[0-9].*/

WHAT I OBSERVED:
* What I see is all roads I can edit highlighted
+ In Reno -- 0 roads
+ In my editable area -- everything not locked above my rank
* Nothing highlighted outside my editable areas.
* If I select a segment outside my editable area with a lock level < or = my editing rank, then the left pane says " User-defined custom check (green)" even though it is not highlighted
* If I select a segment with a lock level > my editing rank, then the left pane says "The segment is not checked"

BTW, the "Exclude non-editable segments" on the front page of Validator settings will change this behavior.

Also – if you want ${typeRank} with any digit value, try /[0-9]+/

The formula you're currently using will give you any typeRank that starts with a digit 0-9 and has any sort of subsequent characters at all, so, 1 or 23 or 4567 or 8ffgsdgrsfg. Not that it really matters in this case, but in the future, if you are looking for numbers only: "+" and "*" affect the character or group right behind it; "*" means "zero or more", and "+" means "one or more"; and "." is a wildcard. So ".*" means "zero or more of any characters at all", whereas "[0-9]+" means "one or more digits".

Re: [Script] WME Validator 1.1.6 / 06.01.2015

PostPosted: Thu Feb 26, 2015 7:02 pm
by sketch
PesachZ wrote:While we're on the topic you can substitute [0-9] with /d
So a search for ^/d+$ will find any string of any length containing exclusively numbers.
For more details see RegEx Tutorial

Sent using Tapatalk for Android 4.4.2

It's \d not /d. Backslashes are used to escape what would otherwise be normal letters. \d is any digit, \w is a word character (iirc it's [A-Za-z0-9]), \b is a word boundary (meaning a space or begin/end of string, or maybe something else)...

Re: [Script] WME Validator 1.1.6 / 06.01.2015

PostPosted: Thu Mar 05, 2015 11:22 pm
by sketch
carloslaso wrote:I think I have searched but I have found nothing about FW, MH and mH with city names, I tried some Regex and failed :?

You want to highlight every FW, MH, mH with a city name?

Code: Select all
${typeRank}:${city}
/1[3-5]:.+$/


1[3-5] == typeRank 13, 14, 15 are mH, MH, FW, respectively
: == separates typeRank from city
.+ == one or more of any characters
$ == end of string

Re: [Script] WME Validator 1.1.6 / 06.01.2015

PostPosted: Fri Mar 06, 2015 6:42 pm
by sketch
Yeah! Well done implementation. I realized that a month or two ago and have been using implementations like this:

${street}#${altStreet[#]}
/(^|#)US-167 [NS](#|$)/

But yours is even easier to use!