Dialog validation regex negative lookbehind is not working

It seems like Negative Lookbehind regex stopped working after upgrade from Ivanchuk-1 to Ivanchuk-4. Current version: ivanchuk-4.20190911145513_9f959bd

Regex:

Regex101

^[a-zA-Z\d_]{3,10}(?<!_)$

When I remove value from dialog and fill it with some value it shows “This field is required”:
image

I could not find any errors in the logs.
Can someone check on your systems if this is the case or it’s on my side?

Thanks in advance,

The issue is specific to Firefox Browser (tested on 76.0.1). The same regex works fine in Chrome.

@tonic Negative lookbehind is not supported in Javascript regex (if you click ECMAScript in your regex101 link there you will see it will fail)

This used to work, I believe the regex I was given many years ago for validating hostnames:

[a-z0-9][a-z0-9-]{0,63}(?<![-.])

Weird that it would change in a minor release. @tonic and/or @james_ can you open a bug report issue?

My offhand guess is that somehow we weren’t doing client-side filtering and now we are, hence my Javascript observation.

I would not mind if it hasn’t worked at all. What I experience is that the same regex works in Chrome and breaks the dialog in Firefox.
@james_, with slight changes your regex has the same issue:

^[a-z0-9][a-z0-9-]{0,63}(?<![-.])$

Firefox Console Error:

SyntaxError: “invalid regexp group”
validateField ui-components.js:3499
validateField ui-components.js:2876
changesHappened ui-components.js:2885
fn vendor-470328311e0f56c17d35.js line 1817 > Function:4
Angular 16
angular.js:14961

@Fryguy, i can create an issue, I guess it’s related to manageiq-ui-classic ?

Yeah, I think ui-classic makes sense for where to log the bug.