It would be nice if the RegexTransformer logged that the user does not
know how to use the different parameters...
On 4/13/10, Gerald wrote:
>
> AWESOME. may take me some time to understand the regex pattern but it
> worked
>
> And many thanks for looking into RegexTransformer.process(). Nice t
AWESOME. may take me some time to understand the regex pattern but it worked
And many thanks for looking into RegexTransformer.process(). Nice to know
that splitby cant be used with regex or replacewith etc
Many thanks Steve.
--
View this message in context:
http://n3.nabble.com/problem-wit
Hi Gerald,
Looking at the source for RegexTransformer.process(), which is called for each
source row, I can see that there are three mutually exclusive processing cases
(warning - (extremely) pseudo code):
1. if (splitBy) then return row.split(splitBy)
2. else if (replaceWith) then return row.r
Thanks guys. Unfortunately, neither pattern works.
I tried various combos including these:
([^|]*)\|([^|]*) with replaceWith="$1"
(.*?)(\|.*) with replaceWith="$1"
(.*?)\|.* with and without replaceWith="$1"
(.*?)\| with and without replaceWith="$1"
As previously mentioned, I have tried
Thanks guys. Unfortunately, neither pattern works.
I tried various combos including these:
([^|]*)\|([^|]*) with replaceWith="$1"
(.*?)(\|.*) with replaceWith="$1"
(.*?)\|.* with and without replaceWith="$1"
(.*?)\| with and without replaceWith="$1"
As previously mentioned, I have tried many
([^|]*)\|([^|]*)--- abc|xyz|123 => abc / xyz
not-| 0 or more, then a pipe, then not-pipe 0 or more, with the third
group ignored.
Does the DIH debugger console help see the strings?
On Mon, Apr 12, 2010 at 6:02 PM, Erick Erickson wrote:
> Talking from general regex-ness, you might be h
Talking from general regex-ness, you might be hitting the "greedy match"
issue. That is, .* matches everything. Have you tried ".*?"
Warning: this may be totally off base
HTH
Erick
On Mon, Apr 12, 2010 at 5:22 PM, Gerald wrote:
>
> forgot to mention that I DID use replaceWith="$1" in tests
forgot to mention that I DID use replaceWith="$1" in tests where the pattern
was like "(.*)(\|.*)" in order to only get the first group
--
View this message in context:
http://n3.nabble.com/problem-with-RegexTransformer-and-delimited-data-tp713846p714636.html
Sent from the Solr - User mailing li