Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

RegEx for loc8codes

  • 14-07-2010 5:31pm
    #1
    Registered Users Posts: 44


    I needed an officially-accepted regular expression (regex) for the new loc8 Irish GPS codes. I contacted the official site - who obviously didn't understand what I needed - and was told it was licensed and any attempt to validate a code would be a breach of copyright.

    No matter how much I emphasised the need for simple "syntactic validation", without the need to look them up, or know how they're generated, or know how they're checksummed, the agent was adamant and wouldn't defer to someone who knew what they were talking about.

    OK, so plan B was 'do it myself'. Here is a regular expression for anyone writing code that has to accept a loc8code from a user:

    ^[a-zA-Z][0-9A-Za-z]{2}-[0-9]{2}-[0-9A-Za-z]{3}$

    Please feel free to suggest improvements.

    Maybe the loc8 people will eventually publish this on their own site - which they can do but they will need my permission ;-)

    Tony Proctor


Comments

  • Closed Accounts Posts: 443 ✭✭garydubh


    ACProctor wrote: »
    I needed an officially-accepted regular expression (regex) for the new loc8 Irish postal codes. I contacted the official site - who obviously didn't understand what I needed - and was told it was licensed and any attempt to validate a code would be a breach of copyright.

    No matter how much I emphasised the need for simple "syntactic validation", without the need to look them up, or know how they're generated, or know how they're checksummed, the agent was adamant and wouldn't defer to someone who knew what they were talking about.

    OK, so plan B was 'do it myself'. Here is a regular expression for anyone writing code that has to accept a loc8code from a user:

    ^[a-zA-Z][0-9A-Za-z]{2}-[0-9]{2}-[0-9A-Za-z]{3}$

    Please feel free to suggest improvements.

    Maybe the loc8 people will eventually publish this on their own site - which they can do but they will need my permission ;-)

    Tony Proctor

    This is NOT an expression to identify a Loc8 Code - there are several other elements that are not explained here - This should not be used as suggested. The Publisher has insisted in publishing this when it has been clearly explained that it is incorrect.

    A Loc8 code is not just a collection of characters - one of the charcaters identifies the rest. The publisher here was told this and has ignored it and therefore this post is exremely misleading and should be ignored.

    The code needed to positively identify a Loc8 Code is available dircetly from Loc8 Code Ltd under license only.


Advertisement