Reference the sample body of text below. I need to extract the contract number from it. The pattern to the contract number is ([A-Z]{1}.{5}-[0-9]{2}-[A-Z]{1}-.{4}), with hyphens separating the different sections. Sometimes the contract number lacks the hyphens. In the sample below, the contract number N0018919D0004 lacks the hyphens.
How can I extract the number and add the hyphens or add the hyphens and extract the number? I need to keep the body of text. There can be more than one contract number -- they will all have or not have hyphens, there is never a mix.
If the hyphens exist, I use the RegEx tool set using the expression ([A-Z]{1}.{5}-[0-9]{2}-[A-Z]{1}-.{4}) to tokenize and split to rows.
Thanks
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Tempus quam pellentesque nec nam. Sapien pellentesque habitant morbi tristique senectus et netus et. Convallis posuere morbi leo urna molestie. Enim sed N0018919D0004 turpis in eu mi bibendum neque egestas. Eu mi bibendum neque egestas congue. Mi ipsum faucibus vitae aliquet nec ullamcorper sit. Id ornare arcu odio ut. Fermentum dui faucibus in ornare quam viverra. Integer malesuada nunc vel risus commodo viverra maecenas accumsan. Consectetur lorem donec massa sapien faucibus et molestie ac. Et magnis dis parturient montes nascetur ridiculus mus mauris.