It is currently March 29th, 2024, 7:49 am
Get help with creating, editing & fixing problems with skins
-
AnimaliX
- Posts: 33
- Joined: August 22nd, 2016, 9:22 pm
Post
by AnimaliX »
hello.
I trying simple regexp for filtering urls name... it must match http/https with or without "www."
I have this
which working good.. for http and https, but not with www
example:
Code: Select all
http://www.abc.com, https://www.abc.com, http://abc.com, https://abc.com
all common url variants and I need with result = "abc"
anyone? thanks
-
FreeRaider
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider »
Try this
Code: Select all
(?siU)\W{1,3}+([^www].*)\.\w{2,3}+
-
AnimaliX
- Posts: 33
- Joined: August 22nd, 2016, 9:22 pm
Post
by AnimaliX »
thanks, but where to put it?
Code: Select all
(?siU)<link>https?://\W{1,3}+([^www].*)\.\w{2,3}+(.*)\.
I trying webparsing from rss therefore "<link>"
sorry regexp is not my "forte"
-
FreeRaider
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider »
Try this
Code: Select all
(?siU)<link>.*\W{1,3}+([^www].*)\.\w{2,3}+(.*)\.
-
AnimaliX
- Posts: 33
- Joined: August 22nd, 2016, 9:22 pm
Post
by AnimaliX »
Yah this works, thanks
it's completely different format from what I imagined :P
-
FreeRaider
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider »
Glad to help!