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

    • Jan 29 2016 | 9:36 am
      I want to extract some part from url address using 'regexp' or other. for example, from "https://1cyjknyddcx62agyb002-c74projects.s3.amazonaws.com/files/2013/06/icons-200x200-product-m-2.png", I want to extract only "m-2". Any solution for this?
    • Jan 30 2016 | 8:54 pm
      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: