Regular Expression Tutorial

    A Max/MSP tutorial and reference patch that explains a few of the basic techniques you need to create regular expressions for string parsing and pattern matching using the [regexp] and [jit.str.regexp] objects. It contains working examples of the most important and widely used features of regular expressions so that you can explore and learn from them in the Max environment.
    The topics covered include:
    • Character Types
    • Anchors
    • The Dot
    • Alternation
    • Repetition
    • References

    • dolphinazz
      Jan 29 2016 | 9:36 am
      I want to extract some part from url address using 'regexp' or other. for example, from "", I want to extract only "m-2". Any solution for this?
    • hz37's icon
      hz37's icon
      Jan 30 2016 | 8:54 pm
      Max Patcher
      In Max, select New From Clipboard.
      Show Text
      Sure, but you gotta ask yourself what assumptions you can make about your input data. For instance, will you only feed your regular expression things that end with .png? Are you only interested in the three characters before the file extension? If so, you could do the following: