You are viewing limited content. For full access, please sign in.

Question

Posted to Government

Question

Regular Expression for Legal Land Description

asked on November 12, 2014

I've tried \w{2}-\d{2}-\d{3}-\d{2}-\w(2) to enforce NW-03-042-12-W4 for a Legal Land Description.

Problems:

1) The first two characters must always be letters, not numbers.  This allows either or.

2) Enforcing the dashes appears to stop me from copy/past from scanned doc to metadata field.

3) The last spot is sometimes only one digit (ie, just a four, not W4) but this enforces two spots to be filled.

Any suggestions on what I should change in the Constraint pattern?

Thx, Connie

1 0

Answer

SELECTED ANSWER
replied on November 13, 2014 Show version history

\w{2}-\d{2}-\d{3}-\d{2}-\d|\w{2}-\d{2}-\d{3}-\d{2}-\w\d

 

I think it would be extremely useful to have a big sharing or RegEx expressions. I will start a new discussion. Thanks for the great idea :)

1 0
replied on November 13, 2014

That worked!  Thanks, a lot!

1 0

Replies

replied on November 13, 2014

Specifically, where are you using this? 

0 0
replied on November 13, 2014

This will be on a template with fields for documents that are about one specific piece of land.  There will be three fields in the end, one formatted with constraints for the long legal address (W4-27-51-14-NE), one for Plan/Block/Lot, one for the new Rural addressing format that we have here in Alberta.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.