Regular Expressions 101

Community Patterns

1...56789...901

Community Library Entry

0

Regular Expression
.NET 7.0 (C#)

@"
^(?=(?<http>(?:https?:\/\/){1}(?:www\.)?)?)(?(?=\k<http>?(?<ipaddr>(?:\d{1,3}\.){3}\d{1,3}(?:\:\d{1,5})?))\k<http>?\k<ipaddr>(?:\.[\w]{1,9})?|\k<http>(?:[\w]\.?){1,255}\.[\w]{1,9})(?:\/.*)?$
"
gm

Description

Can be used to validate on URL's.

Submitted by anonymous - a year ago