[resolved] tReplace advance mode regex

One Star

[resolved] tReplace advance mode regex

Hi
I trying to put together a Canadian postal code that come split in two lines, for example, input is coming from a text file:
A1A
1W9
I want this in one line: A1A1W9
I'm using regex in the tReplace advance mode:
"^(\\d)(\\n)"

But is not working.
What I'm doing wrong ?
Thanks in advance
Felix
sample.txt.txtsample.txt_20150324-0312.txt

Accepted Solutions
One Star

Re: [resolved] tReplace advance mode regex

I could solve my issue
It really was a something I missed on my input file, it has ";" as a separator. for example a postal code would come in this form: A1A;1W9
I change my regex to
"(\\d);(\\d\\d)"

And now it's working !

All Replies

Re: [resolved] tReplace advance mode regex

If you are trying to combine validated postal code, then why don't u just Concat both parts.
One Star

Re: [resolved] tReplace advance mode regex

If you are trying to combine validated postal code, then why don't u just Concat both parts.

It's not so simple, the text is coming from a text file, and there are others values in addition to the Postal code, so I'm doing other replacements with the component (tReplace ->simple mode), for the postal code I decide to use regex, given the uniformity of the Canadian postal code.
One Star

Re: [resolved] tReplace advance mode regex

I could solve my issue
It really was a something I missed on my input file, it has ";" as a separator. for example a postal code would come in this form: A1A;1W9
I change my regex to
"(\\d);(\\d\\d)"

And now it's working !

Re: [resolved] tReplace advance mode regex

Ok thats Cool!!.. Smiley Wink