I am trying to break down this message:
by using regexp but I am unable. In fact it drives me crazy!
all I want is to separate each substring in the place where the | exists!
any ideas plz!
If you don’t have spaces in your message (but something in your message looks like a filepath…), then fromsymbol @separator | may be enough for your needs.
thank you Patrick,
you are right the first part it is a file path and it may contain spaces. :-/
so I need a more general approach…
But if you really want to use regular expressions, try something like this:
regexp \| @substitute " "
You can use [fromsymbol @separator |] even if your message contains spaces, provided it’s a single symbol (which should be in any case, otherwise you’d lose every sequence of multiple spaces that might appear in the file path).
@Andrea true it seems that [fromsymbol @separator |] is working with spaces. What do u mean single symbol?
@Patrick that way [regexp \| @substitute " "] I can seperate them but I will loose track of the individual pieces if they contain spaces
Sorry, I didn’t see you needed spaces before sending the regular expression.
This should work, using the 2nd outlet: regexp (.+)\|(.+)\|(.+)\|(.+)\|
That what I was trying to come up with but instaed of . I was using w :-)
thank you both of you!
Pretty much the same as Patrick’s method but a little more efficient:
This expression captures anything-that-isn’t-a-vertical-bar between other vertical bar, it’s a little bit speedier than the anything-at-all method.