Extract with Regex Input Validation

I have been using some basic regex to validate inputs

I am now trying to find a way to validate that a user has entered “www.” and can’t figure a way. The only things I’ve been able to do is get validation that “www” had been entered but not the “.”

Does anybody have a regex pattern to do such a thing, or a place online that provides regex patterns for input validation?

I’ve been trying to follow this

Which helped me to validate for other inputs and criteria, but failing to get things right on the “www.” pattern.

1 Like

did you ever find the answer to this, seem like it would be a fairly common issue.

I have worked with similar issue with PHP and WordPress the whole URL parsing and validating thing is quite complex.

1 Like

It is a fairly common issue. I’ve never found an especially elegant way to solve it. But the way I’ve ended up doing it is like this
https://knowcode-tech.bubbleapps.io/version-test/url_input_validation?debug_mode=true

and view in the editor
https://bubble.io/page?type=page&name=url_input_validation&id=knowcode-tech&tab=tabs-1

The obvious thing would be if Bubble natively had a input format of URL - it doesn’t - probably because there are many potential views on what a “valid” URL means.

from my research the whole URL thing is a minefield dues to tld, cctld, protocols and all sorts of very strange use cases that originate from the early days of the web… so it is not a simple answer.

This is how I just solved my use case in case anyone is interested.