Re: splitstring(), or splitting a string into characters

2010-02-26 Thread Daniel V Klein
Yes, only arrays are indexable. And yes, regextract is fairly new... > Hi Dan, > > Thanks for the tip. \B does seem to work in the way that I expected the > null pattern to (although I understand the subtle difference you point > out. Fortunately, our usernames shouldn't have any word boundari

Re: splitstring(), or splitting a string into characters

2010-02-26 Thread Jim Lawson
Hi Dan, Thanks for the tip. \B does seem to work in the way that I expected the null pattern to (although I understand the subtle difference you point out. Fortunately, our usernames shouldn't have any word boundaries in them.) The other issue that I am running into is that it seems that slists

Re: splitstring(), or splitting a string into characters

2010-02-26 Thread daniel . klein
Jim- You're right, splitstring does not split on every character (and maybe it should if you specify a null pattern). And you missed on "." (because that makes every character a separator, and then there are no characters to separate) and on "[.]" (because a '.' in a [character class] is just a d

splitstring(), or splitting a string into characters

2010-02-26 Thread Jim Lawson
Hi help-cfengine, Running community 3.0.3. Given a string, is there a way to address the characters in the string? splitstring() seems to work fine as long as there is a delimiter, e.g. vars: "words" slist => splitstring("foo:bar:baz", ":", 3); But it doesn't seem to function quite a