Filter words from a list that begin with specific symbols
I’m not the best with reg expressions but I know what I’m trying to do is a pretty common task yet i’ve searched around without finding a solution so I’m reaching out to see if any of you could kindly help.
I’m trying to filter words from lists that begin with certain symbols.
For example if I had a list that was like "yes %no @maybe /so no"
and I wanted to remove the words that begin with the symbols % and @
my resulting list would be "yes /so no"
Does anybody know how to do this? I’m pretty sure that the right reg exp could take care of, but I’m having trouble figuring it out on my own. Thanks for whatever help you can offer.
this seems to work, but there is probably a better way (not having to use the prepend object) (ie I’m no expert in regex stuff)
----------begin_max5_patcher---------- 699.3oc0W9uSaCCDG+uSeJNEopAhts3jlP5jlDauFLXxIws0nD6HaWncHd2m y4jRA5ufNXPkRhr8ky28Ie8Y2a644mImyz9v2fyAOua644gc0zgWaaO+J577 RpFMyOWVUwDF+AtwLr4Fr+SfuCRACjJnRpXfgWYcbqU0Jl19RTCWJ9shkaby XXZzWBF.QAoMOBZuAWz9ViUSxZLrYfV+PM4S4hIO0GgDzGjSGhORWwM7BL.k YW8YxvtHZrTXDzJFNzOTbZY2HhYUbQIyfoKYEy07+flStOdr1JmY5LNnoy65 0q41fCDm+x96FKRGKKKk2vJfrE.UXuJqmRg7oTErS3FifIgbHvE8AYT39.2n OJvEN+x9mcgktERwmLPUShCLtYJSA8aTvmsS1F3DcQGBawOLjjScrMZqrM7i jvUaQqCpTPWSyY6DmNgUTxgfyVe3TrIi1JNIeTvoYJWCVrUyDE5NbBZIXEqv XtRa.8hpLYIjSEPFywca8hirxXgzbbmGK4BVtbl.cazygrjDDoNIOIFw7vfM .1f2afUvtwFXOgqsHcYQT2rXVTybIsu+xzaMHYDptRwUtwAaSok9ZxCx+Rdv uW8sVQvoqrSPzVy432aZ.6IQzzI6pJTqzNLHdsUgddJjv1MNcTKzs+Yx540y 8PIg+mzHJ1D17Z3HrDOtEJdJkSNdyKhF7nqsgLR.Y0J3w3lAMjacLaKm0.9o rrX+EZC2.3hObg1Rxsfog9BIbVEcgsF8Ws0uExWVoGWQmvz8PWE9VoqvIG2g 4Q+UBL9a5+gLSKmox6x11ulP3xTnfoMbAt7bEarqR.xRalxKJX3vcgWAWSyJ YEatHw9FM1Z1PvNhlnGXyqYzDtGQS5aVzrOeohegQiSFQqqulozstDCD6hrq jpllICvlbgqI5Qacoq4c1m1qwa206uPc4T2m -----------end_max5_patcher-----------
Terry & Nicolas, thank you much for the reply, these are really helping me to get closer to understanding the complex world of RegExpressions.
I’ve decided to go with Nicolas’s example :)