Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^public (?!delegate|event)[^=\n{]*(?=;)
/
gm
Input 1
1
New
//MATCHES CORRECTLY public string Country; public string EmailAddress; public string FirstName; public string LastName; public string PhoneNumber; public string PostalCode; public string State; public List<Object> Example; //MATCHES BUT SHOULDNT public event GetUserListCompletedEventHandler GetUserListCompleted; public delegate void GetUserListCompletedEventHandler(object sender, GetUserListCompletedEventArgs e); //DOES NOT MATCH CORRECTLY throw new Exception("In order to get the public date for blah blah blah"); public List<Order> orderDetails = new List<Order>(); public string CustomerName { get; set; } public string BillingAddress1 { get; set; } public string BillingAddress2 { get; set; }