comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Problem with STRSPLIT
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Problem with STRSPLIT [message #8657] Thu, 10 April 1997 00:00
sritcey is currently offline  sritcey
Messages: 5
Registered: March 1997
Junior Member
R. Kyle Justice (rkj@dukebar.crml.uab.edu) wrote:
: Has anyone noticed this strange behavior with PV-Wave's
: STRSPLIT function?
[snip]
: if I have 'abc.xyz' I am not able to split it
: using '.'

That's because '.' has special meaning in defining the delimiter pattern.
Note that the second input parameter to STRSPLIT is not a simple substring
but a "regular expression". The concept of regular expression is expanded
upon in some of the routines which them, but not this one. For a fuller
discussion see the documentation for STRMATCH.

One way to get what you want is to use
result = strsplit ('abc.xyz', '\.')

to "escape" the period (i.e., disable its special meaning to the regular
expression parsing engine).

(In my opinion the Wave documentation is deficient here in that the
example is far too simple, using ':' as the search pattern, and leading
the user to thing that pattern is limited to being a simple substring.)

Stephen Ritcey, MSc (902)494-3313 (voice) (902)494-5191 (fax)
Physics Dept., Dalhousie Univ., Halifax, N.S., Canada B3H 3J5
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Sun Symbol in Postscript
Next Topic: Problem with STRSPLIT

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:22:05 PDT 2025

Total time taken to generate the page: 0.00480 seconds