How to split message by another character sequence rathen than space?
I know that if I have a message like "some random text" I can use zl iter to give me first "some", then "random" and then "text".
I wish to do the exact same thing but with another character rather than the " " (space). Is it possible, how?
Ideally I would be able to do it with a character sequence, "|||", for instance.
----------begin_max5_patcher---------- 381.3ocuTssbBBCD8Y3qfIOacH.do8o1uiNc5DfnDGHgIY0pU8eujMPU6Eq0 p8kryd1M6d1CaXsuGIUsjaHA2E7Xfm2ZeOODxB3056QpXKyJYFLMhj+hJcFo mKDvWBHr.35NvIJIXDuxsAnQ8CagUygRN.qp4t9QHAO0FplAYEB4zm07LvEk NZXyMChnNyH7Lre362QjiMtgL2LX+NKYUXCHOnErxtHx4UBYS6wgftCzQJGp Ebquu8n2eSMp0BI7CxwQl4jPqIN4XybxEYlCOiYthaLro7OMzPgvrYyFnfAM FlLGOUPw0YyfNbLZhclwesLE+Kkonq8pwDspxrpJUUFbugWyzLPoCZjpqhFc aDZFPO1pD8h+7A6BoTH+3+VPpZwOT3Lp45rtAq8EcvNtlyMfPx.gRtWNIGjS gHOmig6TrbggkVxy+987SkMzSfMC92XS7IvF5YxF2GNVc8Bt1zVRjHM61yTZ q6vdnqP5bwJRz7Eht7S7sUaq+a.s4y2j -----------end_max5_patcher-----------
Thanks for your reply.
I am getting a message in the Max window (a warning, I suppose, since it’s in yellow) which reads: "#N: extra arguments for message "fromsymbol"". The output printed is the same as the list, so it didn’t worked as supposed.
Any idea, why? Thanks.
No idea. What I posted works for me in Max 5 and Max 6. You aren’t using Max 4 by any chance are you? And you didn’t change anything (like maybe a space somewhere)? If you want to post what you have that’s malfunctioning, I’ll try it on my computer.
I am using Max 5. That’s strange then. Anyway, I have found another way to overcome what I initially was trying to accomplish. Thanks anyway.
@nuno could you then please share your discoveries ? i have a similar problem .
i have a list that contain path’s with additional data . how to provide such splitting and keep the path formatting (in quotes) as in original ? i know that [tosymbol] and [fromsymbol] are messing all the data in my example ,its just for presentation .
----------begin_max5_patcher---------- 455.3oc0UFsSaCCEF95fDuCG4qKsNgjVBWM3l8PLPUt0lTukXGYexnYTd2w1 ospPaYUKrglhjsx+43b9yW7w4oyOKhLSuTXIv0v2fnnmbJQAMuRzFgHREa47 RlMjHQIdTO66jAqighkXPG011pY5xsQj7ftK4KFGuU8AsBUrJQH1MFIqDtUW x2FulgyWHUESMh4XmyRhGRG.oS7iYY9w3qFRg62rDUSkTUJvf+h2QU2f6I6q uU9qP8iotG1Z8tbw1ZQWQID39PnmO+L+raZPuYjDElCwmr2AO+dxjm6GSB7I g9wPlj+wjo1HU3gPSZuPSbRfMWl9mwF5wXyG96+CFcUW+C7EqnlYXn1.qVs5 fsSzdAkIz.Zxh+eXCSkvZYEh8IliMvkPgdJagfwg6He85Q7BdAbAPiAKZZaF o+wvGY+7NhGjPNTWJXVwTKxZg7qxGNoaUUtacKZLfstqQs5ltUcvN079eRVR X2XZV2mgwGk+I+8NJqqhjRoZui+C11G3MeUr5Fy7MOw0GZA6XctvhRECkZ0N Ik95jVH4bg5UsVURds107u1Gu2VkS2Z4mh27+U5SvbusrGwbzOGyQOEyk0au 4EbSuDA1qOJ -----------end_max5_patcher-----------
Im in need to get those lists separately . I could not find any common solution . as u can see there is a special need for keeping the path formatting ,and those lists contain variety amount of elements .
Ive also tried to use [regexp] in different logic but somehow it cuts the "zeros" from the lists . like 06 becomes 6 :/
i hope to hear from you guys
Hello Nicolas !
Thank you for the input ,
but please take a look :
everything is as should be while you print the results !
but if you want to use that data ,you are still getting these "backslash escapes" wrapped around the quotes . Looking at your second regexp i can tell that it should do the job . but its not ?
----------begin_max5_patcher---------- 546.3ocyV1saZCCEG+5To9NbjklzpJEhSB4id01U6g.nHCwK3tDmnXmUXk8t OaGRaABEXhBUHrkNG+we+6b7w44quxBMIeNUff6gAfk0yJKVFaZKVMFrPYj4 SSIBy.QYTgfjPQcV4TRmKMNFhFNbH5G22Kir.tCr8A4B0udKxq59D42ZmCQu LMVrYR4Sd7NmWL9ybtTv9CU6B6z0twNuJiwSoRiBbdi07JYiYbi4Bhb5LFOY bIcpr9r45pVKvI.q67LqLfC6ZCiZlT8BIWTPqmAB8pOsp3jLiGz2KYjTjwye u9JcupqyASON8I0Qda3wjzx1XC1tc33sC3fOd33XfCtejty01PJ2OSronjwk sAmnSBareG13Wm3fqYS31r4bb9KoIz4EvW02fF7ftczs51afuIplHjLYkjBe wtMDEdRPT+8m9TiHGb3gj+zYi+WFdtb4xAOnZFcqp4l1nm+Yhd028vNNedf2 NKyqXE3BI4iIynjXvTwONINQWxGCBY4hpd4+xTwGA5AGAEoThfNVHUOLDEF0 M.du2IpmkG30uqeeHLHLnsPi2wEZb9uqKZBMA1A0o2mt5h0iEkx3a8BrQLZG aDfD4UkSa1rU2tA7qaZLUULfSjrb9aFjy5CZFKNlxWqvWFKtHWUickNfQ6Nq 4njl69jlp.NXe1kl256Z6Ry+hHM+CIfFdQj1AkqEcwj1dCn5uj5BnsM21OJt oMn59GfqVWZl -----------end_max5_patcher-----------
it works . wonderful !
thank you very much for your huge help and time Nicolas , it seems to be a bit more tricky than i thought .
and with comma’s :/ … Nicolas ? did you provided those expressions from head directly ? if so , im amazed … im not going to learn it, i guess . im glad that you came across
i found Luke Hall’s regular expression tutorials ( nice effort from Luke – thanks! ). if someone need to dig in
Forums > MaxMSP