Victor Charles
asked on
Help with entering "-" multiple location in NSC data element
Hi,
How do I convert data in my NSC data element from xxxxxxxxxxxxx to xxxx-xx-xxx-xxxx using VB.NET?
Thanks,
Victor
How do I convert data in my NSC data element from xxxxxxxxxxxxx to xxxx-xx-xxx-xxxx using VB.NET?
Thanks,
Victor
ASKER
Hi Fernando,
I would like to convert file A to file B, for example if file A contains:
<Root>
<Table>
<ID>1</ID>>
<Item></Item>
<NSC>1111111111111<NSC>
</Table>
<Table>
<ID>2</ID>>
<Item></Item>
<NSC>2222222222222<NSC>
</Table>
<Table>
<ID>3</ID>>
<Item></Item>
<NSC>3333333333333<NSC>
</Table>
</Root>
How do I obtain file B as shown below:
<Root>
<Table>
<ID>1</ID>>
<Item></Item>
<NSC>1111-11-111-1111<NSC>
</Table>
<Table>
<ID>2</ID>>
<Item></Item>
<NSC>2222-22-222-2222<NSC>
</Table>
<Table>
<ID>3</ID>>
<Item></Item>
<NSC>3333-33-333-3333<NSC>
</Table>
</Root>
Victor
I would like to convert file A to file B, for example if file A contains:
<Root>
<Table>
<ID>1</ID>>
<Item></Item>
<NSC>1111111111111<NSC>
</Table>
<Table>
<ID>2</ID>>
<Item></Item>
<NSC>2222222222222<NSC>
</Table>
<Table>
<ID>3</ID>>
<Item></Item>
<NSC>3333333333333<NSC>
</Table>
</Root>
How do I obtain file B as shown below:
<Root>
<Table>
<ID>1</ID>>
<Item></Item>
<NSC>1111-11-111-1111<NSC>
</Table>
<Table>
<ID>2</ID>>
<Item></Item>
<NSC>2222-22-222-2222<NSC>
</Table>
<Table>
<ID>3</ID>>
<Item></Item>
<NSC>3333-33-333-3333<NSC>
</Table>
</Root>
Victor
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank You.
ASKER
Thank You.
You will need this import for the regular expression.
Imports System.Text.RegularExpress ions
Imports System.Text.RegularExpress
Hi Victor, how are you doing with this question?
ASKER
Hi Fernando,
I am sorry for the late reply. The codes worked.
Thank You.
I am sorry for the late reply. The codes worked.
Thank You.
Not a problem Victor, glad to help.
What exactly is NSC data element? What is the data type of the field you are trying to re-format?