I am new to programming.
I am trying to create validation for a UK postcode.
I have found what I believe will do the job (see below), but I do not know what other lines I need to enter to complete the process.
^(([gG][iI][rR] {0,}0[aA]{2})|((([a-pr-uwyzA-PR-UWYZ][a-hk-yA-HK-Y]?[0-9][0-9]?|(([a-pr-uwyzA-PR-UWYZ][0-9][a-hjkstuwA-HJKSTUW]|([a-pr-uwyzA-PR-UWYZ][a-hk-yA-HK-Y][0-9[abehmnprv-yABEHMNPRV-Y])))&[0-9][abd-hjlnp-uw-zABD-HJLNP-UW-Z]{2}))$
Can anyone please help me with the other lines I would need to type to get this validation to work.
I checked the above code with the source and typed it into my programme (see below) when I tried to run the programme it came up with 54 errors. What am I missing?
namespace Moondog_odering_system { public partial class CustomerDetails : Form { public CustomerDetails() { InitializeComponent(); }
private void textBox11_TextChanged(object sender, EventArgs e)
{
^(([gG][iI][rR] {0,}0[aA]{2})|((([a-pr-uwyzA-PR-UWYZ][a-hk-yA-HK-Y]?[0-9][0-9]?)|(([a-pr-uwyzA-PR-UWYZ][0-9][a-hjkstuwA-HJKSTUW])|([a-pr-uwyzA-PR-UWYZ][a-hk-yA-HK-Y][0-9][abehmnprv-yABEHMNPRV-Y]))) {0,}[0-9][abd-hjlnp-uw-zABD-HJLNP-UW-Z]{2}))$
}
}
}