Skip to main content
Participating Frequently
Aug 30, 2024 11:38 AM UTC
Question

Website Regex Validation

I want to validate a website URL that goes as an input, 
requirement is to start with https://www. and with {.in, .com, .net}

Please Assist, Thanks in Advance

    3 replies

    stefanhelzle0001
    Brainy
    Aug 30, 2024 11:49 AM UTC

    Regex pattern are not Appian specific and the internet has billions of examples.

    I asked my LLM and it gave me this: ^www\.[a-zA-Z0-9.-] \.(in|com|net)$

    Do you have any specific question?

    Participating Frequently
    Aug 30, 2024 12:00 PM UTC

    Thanks Stefan, But it didnt work

    mikes0011
    Brainy
    Aug 30, 2024 2:24 PM UTC

    i assume you adjusted Stefan's example to test for a string starting with "https" instead of 'www."?

    To be frank, for this sort of ask, you will need to do some of your own troubleshooting, googling for regex patterns, testing, inventing, etc - it will be hard to have someone here hand you a perfect example on a silver platter if your requirements are vague and your feedback is merely "it didn't work" without specifying what tried, what changes you already attempted, what your output was when it didn't work.....

    The Expression Guru