message is "Boston, Massachusetts" so obviously Max parses it into 2 separate messages. How can I remove the comma, or better yet inject a / so that it is correctly read?
I also have messages like "Northern Peninsula, Alaska, USA". So there will be multiple instances of comma’s messing up my processing.
The first outlet of a [regexp , @substitute \,] will give you "Northern Peninsula, Alaska, USA".
thanks for that. It sorta solved my problem but ended up doing a different workaround. I have another dilemma now. I need to separate this message into month, date, year (2010-02-10). I assume I am using [regexp] again or something similar?
regexp (\d+)-(\d)+-(\d+) should do it. \d represent a digit and the + is a quantifier which defines how many times the thing before (\d) appears. The parenthesis are used to create backreferences which are sent out the second outlet.
----------begin_max5_patcher---------- 458.3oc2U1saBBCEG+Z3onoWMy.SaQ.2taOGalkBzgcCJDnl4lw28QKv7iIB FMlEkXANm1y4e+4wSWYZ.CxVxJgfGAOCLLVYZXnMoLXz7tALktLLgVpmFLkU VRiYPqZeR1Ro1NA4Ow1w2dhaqq2xDxR92LkaLYLpwrXQJWjvj5vQZLlWvJYB IUxyDuVvBk0RBivUqCLEoFaG.y1DorEx1PgarVaR9UNqNFP3uKHmJCmyEwck AekJA3oakCdjd2kE7tM1Y6clflpS.7oBNMApbr1zTMXMPRVI+.VwoPK7A23j t13bgDZAfATQ7QY.g3Nl3VswePyBWMKHnNn.4FkBXOuSfBnaUJf7GNEldgg. 6ypn9mNKKD4zvO.H004SHmdHzV2FDmb0bB63eLP4dYAU28fwHaDYupyg1C9R zN02SW030e2TmqRsSAKlsLGb2KUehtejc8Cit2t0x4WP41Inr16a+fCicz2l L4nMeFF5zKElvE6e.uN8J66xyxrEEgshu8.OvFEDwJkbg9H5smzNyYNOJhoc 2RvTdTdV0+lZz.X1A+wcnR5+mhTYC2ihbupJRkMReLhb0kTePR0z5JKo9pjl dFJp5k0l+3UmZNM -----------end_max5_patcher-----------
If it is just the date string you are dealing with you could even use [regexp - @substitute " "] which will swap the -hyphens- for spaces and send the list from the first outlet, but this will only work if you have the correct formatting to start with.