You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • There are now finally regular expressions in Espruino! If you download a cutting edge build then you should get them.

    There's:

    • /regex/ syntax to define them
    • Or `new RegExp("regex")
    • regex.exec to match on a supplied string
    • string.replace(regex, replacement)
    • string.split(regex)

    It's not got all the RegEx functionality built in, but should cover most of the common use-cases.

    Let me know how it goes! The RegEx system might still need some work, so if you find a RegEx that doesn't seem to be working properly, please let me know!

About

Avatar for Gordon @Gordon started