You are here: PSPad forum > English discussion forum > Re: Please help complex Java regex

Re: Please help complex Java regex

#1 Please help complex Java regex

Posted by: Haunebu | Date: 2021-04-23 17:33 | IP: IP Logged

I want correct Match URL (Java regex)

example.com
example.com
AND
example.com

My wrong escape and wrong url delimiter
https:\\example\\.com/(20[01][0-9]|2020)/0*([1-9]|1[0-2])/(\d+[-/]\d+)|https:\\example\\.com/diary/(.*)/(\d+)-(\d+)-(\d+)

Edited 1 time(s). Last edit at 2021-04-23 17:33 by Haunebu.

Options: Reply | Quote | Up ^


#2 Re: Please help complex Java regex

Posted by: pspad | Date: 2021-04-23 17:46 | IP: IP Logged

Start with fix of / and \

Options: Reply | Quote | Up ^


#3 Re: Please help complex Java regex

Posted by: pspad | Date: 2021-04-23 17:54 | IP: IP Logged

https://example.com/(diary/example/){0,1}20[01][0-9]([/-]\d{2}){2}([/-]\d+){0,1}

Options: Reply | Quote | Up ^


#4 Re: Please help complex Java regex

Posted by: Haunebu | Date: 2021-04-23 18:02 | IP: IP Logged

Edit.. My mistake
Not java Regex

JSON regex

json-schema.org

Options: Reply | Quote | Up ^


#5 Re: Please help complex Java regex

Posted by: Haunebu | Date: 2021-04-23 18:08 | IP: IP Logged

pspad:
https://example.com/(diary/example/){0,1}20[01][0-9]([/-]\d{2}){2}([/-]\d+){0,1}

Error:
is not a valid 'java.util.List

Options: Reply | Quote | Up ^


#6 Re: Please help complex Java regex

Posted by: pspad | Date: 2021-04-23 18:25 | IP: IP Logged

If you request it for Java, visit any Java forum. This forum is for PSPad support and my regexp works correctly in PSPad

Options: Reply | Quote | Up ^


#7 Re: Please help complex Java regex

Posted by: Haunebu | Date: 2021-04-23 18:40 | IP: IP Logged

NO MATCH

image

Edited 2 time(s). Last edit at 2021-04-23 18:41 by Haunebu.

Options: Reply | Quote | Up ^


#8 Re: Please help complex Java regex

Posted by: pspad | Date: 2021-04-23 18:44 | IP: IP Logged

I don't cate for you testing web. I provided correct regexp for pspad.
If you won't stop use pspad forum for your personal activities not related with pspad, your account will be deactivated.
I markex this topic as solved and closed

Options: Reply | Quote | Up ^


This Thread has been closed





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR