This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='category ' id='category_1032'> | |
<h3 class='name'><a href="/categories/desktop-accessories-clipboards.html">Clipboards</a></h3> | |
<div class='image'><a href="/categories/desktop-accessories-clipboards.html" id="subcategory_image_1032"><img alt="Clipboards" src="http://www.officekitten.co.uk/images/products/536552/extra_small.jpg?1271253611" /></a></div> | |
<div class='product_count'>28 items</div> | |
</div> | |
This works, but not if you click on 'product_count' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_postcode(postcode) | |
alpha1 = "[abcdefghijklmnoprstuwyz]" | |
alpha2 = "[abcdefghklmnopqrstuvwxy]" | |
alpha3 = "[abcdefghjkstuw]" | |
alpha4 = "[abehmnprvwxy]" | |
alpha5 = "[abdefghjlnpqrstuwxyz]" | |
postcode_expressions = [ | |
%r{^(#{alpha1}{1}#{alpha2}?[0-9]{1,2})(\s*)([0-9]{1}#{alpha5}{2})$}, # AN NAA, ANN NAA, AAN NAA, and AANN NAA | |
%r{^(#{alpha1}{1}[0-9]{1}#{alpha3}{1})(\s*)([0-9]{1}#{alpha5}{2})$}, # ANA NAA |
NewerOlder