Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Behaviour of String.split()
Behaviour of String.split() [message #468410] Wed, 05 August 2009 13:15 Go to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Behaviour of the operation split on the class String is curious. The
following output is generated from a simple model transformation:

This input (within my ETL file):
'1234.5678'.println();
'1234.5678'.split('.').println();
'1234-5678'.println();
'1234-5678'.split('-').println();

Provides this output (in the console window):
main:
[epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] Running
ETL file
[epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234.5678
[epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] Sequence {}
[epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234-5678
[epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] Sequence
{1234, 5678}
[epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
Completed ETL file
BUILD SUCCESSFUL

There appears to be something odd with the behaviour of the split()
operation when the string delimiter is the point character '.', should I
be calling this operation differently?

Best Wishes
Chris
Re: Behaviour of String.split() [message #468452 is a reply to message #468410] Wed, 05 August 2009 14:55 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Hi Chris,

Keep in mind that the argument to split is a regular expression. Thus,
split('.') means split at any character, which naturally gives you the
empty sequence. You may want to try split ('\.') instead (not tested)

Steffen

Chris Holmes wrote:
> Behaviour of the operation split on the class String is curious. The
> following output is generated from a simple model transformation:
>
> This input (within my ETL file):
> '1234.5678'.println();
> '1234.5678'.split('.').println();
> '1234-5678'.println();
> '1234-5678'.split('-').println();
>
> Provides this output (in the console window):
> main:
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
> Running ETL file
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234.5678
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
> Sequence {}
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234-5678
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
> Sequence {1234, 5678}
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
> Completed ETL file
> BUILD SUCCESSFUL
>
> There appears to be something odd with the behaviour of the split()
> operation when the string delimiter is the point character '.', should
> I be calling this operation differently?
>
> Best Wishes
> Chris
Re: Behaviour of String.split() [message #468461 is a reply to message #468452] Wed, 05 August 2009 15:31 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Chris,

As Steffen mentions, the argument to split is a regular expression, in
which the . has special meaning.

split('\\.') is the correct way to phrase this query, as backslashes
must be escaped in EOL strings.

Cheers,
Louis.

Steffen Zschaler wrote:
> Hi Chris,
>
> Keep in mind that the argument to split is a regular expression. Thus,
> split('.') means split at any character, which naturally gives you the
> empty sequence. You may want to try split ('\.') instead (not tested)
>
> Steffen
>
> Chris Holmes wrote:
>> Behaviour of the operation split on the class String is curious. The
>> following output is generated from a simple model transformation:
>>
>> This input (within my ETL file):
>> '1234.5678'.println();
>> '1234.5678'.split('.').println();
>> '1234-5678'.println();
>> '1234-5678'.split('-').println();
>>
>> Provides this output (in the console window):
>> main:
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>> Running ETL file
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234.5678
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>> Sequence {}
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234-5678
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>> Sequence {1234, 5678}
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>> Completed ETL file
>> BUILD SUCCESSFUL
>>
>> There appears to be something odd with the behaviour of the split()
>> operation when the string delimiter is the point character '.', should
>> I be calling this operation differently?
>>
>> Best Wishes
>> Chris
Re: Behaviour of String.split() [message #468477 is a reply to message #468461] Wed, 05 August 2009 15:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Louis/Steffen,
Thanks for your help, setting the delimiter to '\\.' corrects the
problem. Is there a definitive description of such operations? I'm
currently using 'The Epsilon Book', this seems to neglect to mention
that the delimiter is an RE.

Best Wishes
Chris

Louis Rose wrote:
> Hi Chris,
>
> As Steffen mentions, the argument to split is a regular expression, in
> which the . has special meaning.
>
> split('\\.') is the correct way to phrase this query, as backslashes
> must be escaped in EOL strings.
>
> Cheers,
> Louis.
>
> Steffen Zschaler wrote:
>> Hi Chris,
>>
>> Keep in mind that the argument to split is a regular expression. Thus,
>> split('.') means split at any character, which naturally gives you the
>> empty sequence. You may want to try split ('\.') instead (not tested)
>>
>> Steffen
>>
>> Chris Holmes wrote:
>>> Behaviour of the operation split on the class String is curious. The
>>> following output is generated from a simple model transformation:
>>>
>>> This input (within my ETL file):
>>> '1234.5678'.println();
>>> '1234.5678'.split('.').println();
>>> '1234-5678'.println();
>>> '1234-5678'.split('-').println();
>>>
>>> Provides this output (in the console window):
>>> main:
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> Running ETL file
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> 1234.5678
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> Sequence {}
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> 1234-5678
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> Sequence {1234, 5678}
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> Completed ETL file
>>> BUILD SUCCESSFUL
>>>
>>> There appears to be something odd with the behaviour of the split()
>>> operation when the string delimiter is the point character '.',
>>> should I be calling this operation differently?
>>>
>>> Best Wishes
>>> Chris
Re: Behaviour of String.split() [message #471802 is a reply to message #468477] Wed, 05 August 2009 18:57 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Chris,

I think that the Epsilon Book is the best reference, though Dimitrios
may have a view on this when he returns from vacation.

I've corrected the description of split in the book, which can be found
here:
http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/doc/org.eclipse.epsilon.book/EpsilonBook.pdf

Apologies for the inconsistency.

Best,
Louis.

Chris Holmes wrote:
> Louis/Steffen,
> Thanks for your help, setting the delimiter to '\\.' corrects the
> problem. Is there a definitive description of such operations? I'm
> currently using 'The Epsilon Book', this seems to neglect to mention
> that the delimiter is an RE.
>
> Best Wishes
> Chris
>
> Louis Rose wrote:
>> Hi Chris,
>>
>> As Steffen mentions, the argument to split is a regular expression, in
>> which the . has special meaning.
>>
>> split('\\.') is the correct way to phrase this query, as backslashes
>> must be escaped in EOL strings.
>>
>> Cheers,
>> Louis.
>>
>> Steffen Zschaler wrote:
>>> Hi Chris,
>>>
>>> Keep in mind that the argument to split is a regular expression.
>>> Thus, split('.') means split at any character, which naturally gives
>>> you the empty sequence. You may want to try split ('\.') instead (not
>>> tested)
>>>
>>> Steffen
>>>
>>> Chris Holmes wrote:
>>>> Behaviour of the operation split on the class String is curious. The
>>>> following output is generated from a simple model transformation:
>>>>
>>>> This input (within my ETL file):
>>>> '1234.5678'.println();
>>>> '1234.5678'.split('.').println();
>>>> '1234-5678'.println();
>>>> '1234-5678'.split('-').println();
>>>>
>>>> Provides this output (in the console window):
>>>> main:
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> Running ETL file
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> 1234.5678
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> Sequence {}
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> 1234-5678
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> Sequence {1234, 5678}
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> Completed ETL file
>>>> BUILD SUCCESSFUL
>>>>
>>>> There appears to be something odd with the behaviour of the split()
>>>> operation when the string delimiter is the point character '.',
>>>> should I be calling this operation differently?
>>>>
>>>> Best Wishes
>>>> Chris
Re: Behaviour of String.split() [message #478258 is a reply to message #471802] Thu, 06 August 2009 09:05 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Hi Chris,

Also, of course, keep in mind that String is just the standard
java.lang.String, so the definite reference (with the exception of the
additional need to escape backslashes) is the standard JAVA API reference.

Steffen

Louis Rose wrote:
> Hi Chris,
>
> I think that the Epsilon Book is the best reference, though Dimitrios
> may have a view on this when he returns from vacation.
>
> I've corrected the description of split in the book, which can be
> found here:
> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/doc/org.eclipse.epsilon.book/EpsilonBook.pdf
>
>
> Apologies for the inconsistency.
>
> Best,
> Louis.
>
> Chris Holmes wrote:
>> Louis/Steffen,
>> Thanks for your help, setting the delimiter to '\\.' corrects the
>> problem. Is there a definitive description of such operations? I'm
>> currently using 'The Epsilon Book', this seems to neglect to mention
>> that the delimiter is an RE.
>>
>> Best Wishes
>> Chris
>>
>> Louis Rose wrote:
>>> Hi Chris,
>>>
>>> As Steffen mentions, the argument to split is a regular expression,
>>> in which the . has special meaning.
>>>
>>> split('\\.') is the correct way to phrase this query, as backslashes
>>> must be escaped in EOL strings.
>>>
>>> Cheers,
>>> Louis.
>>>
>>> Steffen Zschaler wrote:
>>>> Hi Chris,
>>>>
>>>> Keep in mind that the argument to split is a regular expression.
>>>> Thus, split('.') means split at any character, which naturally
>>>> gives you the empty sequence. You may want to try split ('\.')
>>>> instead (not tested)
>>>>
>>>> Steffen
>>>>
>>>> Chris Holmes wrote:
>>>>> Behaviour of the operation split on the class String is curious.
>>>>> The following output is generated from a simple model transformation:
>>>>>
>>>>> This input (within my ETL file):
>>>>> '1234.5678'.println();
>>>>> '1234.5678'.split('.').println();
>>>>> '1234-5678'.println();
>>>>> '1234-5678'.split('-').println();
>>>>>
>>>>> Provides this output (in the console window):
>>>>> main:
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> Running ETL file
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> 1234.5678
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> Sequence {}
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> 1234-5678
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> Sequence {1234, 5678}
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> Completed ETL file
>>>>> BUILD SUCCESSFUL
>>>>>
>>>>> There appears to be something odd with the behaviour of the
>>>>> split() operation when the string delimiter is the point character
>>>>> '.', should I be calling this operation differently?
>>>>>
>>>>> Best Wishes
>>>>> Chris
Re: Behaviour of String.split() [message #572348 is a reply to message #468410] Wed, 05 August 2009 14:55 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Hi Chris,

Keep in mind that the argument to split is a regular expression. Thus,
split('.') means split at any character, which naturally gives you the
empty sequence. You may want to try split ('\.') instead (not tested)

Steffen

Chris Holmes wrote:
> Behaviour of the operation split on the class String is curious. The
> following output is generated from a simple model transformation:
>
> This input (within my ETL file):
> '1234.5678'.println();
> '1234.5678'.split('.').println();
> '1234-5678'.println();
> '1234-5678'.split('-').println();
>
> Provides this output (in the console window):
> main:
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
> Running ETL file
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234.5678
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
> Sequence {}
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234-5678
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
> Sequence {1234, 5678}
> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
> Completed ETL file
> BUILD SUCCESSFUL
>
> There appears to be something odd with the behaviour of the split()
> operation when the string delimiter is the point character '.', should
> I be calling this operation differently?
>
> Best Wishes
> Chris
Re: Behaviour of String.split() [message #572361 is a reply to message #468452] Wed, 05 August 2009 15:31 Go to previous message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Chris,

As Steffen mentions, the argument to split is a regular expression, in
which the . has special meaning.

split('\\.') is the correct way to phrase this query, as backslashes
must be escaped in EOL strings.

Cheers,
Louis.

Steffen Zschaler wrote:
> Hi Chris,
>
> Keep in mind that the argument to split is a regular expression. Thus,
> split('.') means split at any character, which naturally gives you the
> empty sequence. You may want to try split ('\.') instead (not tested)
>
> Steffen
>
> Chris Holmes wrote:
>> Behaviour of the operation split on the class String is curious. The
>> following output is generated from a simple model transformation:
>>
>> This input (within my ETL file):
>> '1234.5678'.println();
>> '1234.5678'.split('.').println();
>> '1234-5678'.println();
>> '1234-5678'.split('-').println();
>>
>> Provides this output (in the console window):
>> main:
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>> Running ETL file
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234.5678
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>> Sequence {}
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl] 1234-5678
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>> Sequence {1234, 5678}
>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>> Completed ETL file
>> BUILD SUCCESSFUL
>>
>> There appears to be something odd with the behaviour of the split()
>> operation when the string delimiter is the point character '.', should
>> I be calling this operation differently?
>>
>> Best Wishes
>> Chris
Re: Behaviour of String.split() [message #572422 is a reply to message #468461] Wed, 05 August 2009 15:55 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Louis/Steffen,
Thanks for your help, setting the delimiter to '\\.' corrects the
problem. Is there a definitive description of such operations? I'm
currently using 'The Epsilon Book', this seems to neglect to mention
that the delimiter is an RE.

Best Wishes
Chris

Louis Rose wrote:
> Hi Chris,
>
> As Steffen mentions, the argument to split is a regular expression, in
> which the . has special meaning.
>
> split('\\.') is the correct way to phrase this query, as backslashes
> must be escaped in EOL strings.
>
> Cheers,
> Louis.
>
> Steffen Zschaler wrote:
>> Hi Chris,
>>
>> Keep in mind that the argument to split is a regular expression. Thus,
>> split('.') means split at any character, which naturally gives you the
>> empty sequence. You may want to try split ('\.') instead (not tested)
>>
>> Steffen
>>
>> Chris Holmes wrote:
>>> Behaviour of the operation split on the class String is curious. The
>>> following output is generated from a simple model transformation:
>>>
>>> This input (within my ETL file):
>>> '1234.5678'.println();
>>> '1234.5678'.split('.').println();
>>> '1234-5678'.println();
>>> '1234-5678'.split('-').println();
>>>
>>> Provides this output (in the console window):
>>> main:
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> Running ETL file
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> 1234.5678
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> Sequence {}
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> 1234-5678
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> Sequence {1234, 5678}
>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>> Completed ETL file
>>> BUILD SUCCESSFUL
>>>
>>> There appears to be something odd with the behaviour of the split()
>>> operation when the string delimiter is the point character '.',
>>> should I be calling this operation differently?
>>>
>>> Best Wishes
>>> Chris
Re: Behaviour of String.split() [message #572497 is a reply to message #468477] Wed, 05 August 2009 18:57 Go to previous message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Chris,

I think that the Epsilon Book is the best reference, though Dimitrios
may have a view on this when he returns from vacation.

I've corrected the description of split in the book, which can be found
here:
http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/doc/org.eclipse.epsilon.book/EpsilonBook.pdf

Apologies for the inconsistency.

Best,
Louis.

Chris Holmes wrote:
> Louis/Steffen,
> Thanks for your help, setting the delimiter to '\\.' corrects the
> problem. Is there a definitive description of such operations? I'm
> currently using 'The Epsilon Book', this seems to neglect to mention
> that the delimiter is an RE.
>
> Best Wishes
> Chris
>
> Louis Rose wrote:
>> Hi Chris,
>>
>> As Steffen mentions, the argument to split is a regular expression, in
>> which the . has special meaning.
>>
>> split('\\.') is the correct way to phrase this query, as backslashes
>> must be escaped in EOL strings.
>>
>> Cheers,
>> Louis.
>>
>> Steffen Zschaler wrote:
>>> Hi Chris,
>>>
>>> Keep in mind that the argument to split is a regular expression.
>>> Thus, split('.') means split at any character, which naturally gives
>>> you the empty sequence. You may want to try split ('\.') instead (not
>>> tested)
>>>
>>> Steffen
>>>
>>> Chris Holmes wrote:
>>>> Behaviour of the operation split on the class String is curious. The
>>>> following output is generated from a simple model transformation:
>>>>
>>>> This input (within my ETL file):
>>>> '1234.5678'.println();
>>>> '1234.5678'.split('.').println();
>>>> '1234-5678'.println();
>>>> '1234-5678'.split('-').println();
>>>>
>>>> Provides this output (in the console window):
>>>> main:
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> Running ETL file
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> 1234.5678
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> Sequence {}
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> 1234-5678
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> Sequence {1234, 5678}
>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>> Completed ETL file
>>>> BUILD SUCCESSFUL
>>>>
>>>> There appears to be something odd with the behaviour of the split()
>>>> operation when the string delimiter is the point character '.',
>>>> should I be calling this operation differently?
>>>>
>>>> Best Wishes
>>>> Chris
Re: Behaviour of String.split() [message #572525 is a reply to message #471802] Thu, 06 August 2009 09:05 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Hi Chris,

Also, of course, keep in mind that String is just the standard
java.lang.String, so the definite reference (with the exception of the
additional need to escape backslashes) is the standard JAVA API reference.

Steffen

Louis Rose wrote:
> Hi Chris,
>
> I think that the Epsilon Book is the best reference, though Dimitrios
> may have a view on this when he returns from vacation.
>
> I've corrected the description of split in the book, which can be
> found here:
> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/doc/org.eclipse.epsilon.book/EpsilonBook.pdf
>
>
> Apologies for the inconsistency.
>
> Best,
> Louis.
>
> Chris Holmes wrote:
>> Louis/Steffen,
>> Thanks for your help, setting the delimiter to '\\.' corrects the
>> problem. Is there a definitive description of such operations? I'm
>> currently using 'The Epsilon Book', this seems to neglect to mention
>> that the delimiter is an RE.
>>
>> Best Wishes
>> Chris
>>
>> Louis Rose wrote:
>>> Hi Chris,
>>>
>>> As Steffen mentions, the argument to split is a regular expression,
>>> in which the . has special meaning.
>>>
>>> split('\\.') is the correct way to phrase this query, as backslashes
>>> must be escaped in EOL strings.
>>>
>>> Cheers,
>>> Louis.
>>>
>>> Steffen Zschaler wrote:
>>>> Hi Chris,
>>>>
>>>> Keep in mind that the argument to split is a regular expression.
>>>> Thus, split('.') means split at any character, which naturally
>>>> gives you the empty sequence. You may want to try split ('\.')
>>>> instead (not tested)
>>>>
>>>> Steffen
>>>>
>>>> Chris Holmes wrote:
>>>>> Behaviour of the operation split on the class String is curious.
>>>>> The following output is generated from a simple model transformation:
>>>>>
>>>>> This input (within my ETL file):
>>>>> '1234.5678'.println();
>>>>> '1234.5678'.split('.').println();
>>>>> '1234-5678'.println();
>>>>> '1234-5678'.split('-').println();
>>>>>
>>>>> Provides this output (in the console window):
>>>>> main:
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> Running ETL file
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> 1234.5678
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> Sequence {}
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> 1234-5678
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> Sequence {1234, 5678}
>>>>> [epsilon.etl - IndeFile2NetworkInitialisationDataCatalogue.etl]
>>>>> Completed ETL file
>>>>> BUILD SUCCESSFUL
>>>>>
>>>>> There appears to be something odd with the behaviour of the
>>>>> split() operation when the string delimiter is the point character
>>>>> '.', should I be calling this operation differently?
>>>>>
>>>>> Best Wishes
>>>>> Chris
Previous Topic:[Eugenia] Running Eugenia from Ant?
Next Topic:[ETL] How to deal with removing circular references
Goto Forum:
  


Current Time: Thu Mar 28 13:55:12 GMT 2024

Powered by FUDForum. Page generated in 0.04088 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top