britzl / aws-sdk-lua

Auto generated AWS SDK for Lua
Apache License 2.0
39 stars 10 forks source link

Add support for string patterns #5

Open britzl opened 5 years ago

britzl commented 5 years ago

The string patterns are more complex than what the built-in Lua pattern matching system can support. Is it worth the time to implement somehow?

SirLynix commented 5 years ago

How do they compare to regexes?

britzl commented 5 years ago

The Lua pattern matching system resembles regex quite a lot bit its quite a bit simpler. I've seen some of the regex patterns in the AWS SDK API specs that would be hard (impossible?) to port to Lua patterns.

SirLynix commented 5 years ago

I was asking about Amazon string patterns, how do they compare to regexes (are they regexes)?

britzl commented 5 years ago

Oh, ok. I believe they are normal regexes. I could have sworn that I had read some API docs mentioning which specific regex flavour it is but now I can't find it...

At least these two look like standard regexes:

https://github.com/britzl/aws-sdk-lua/blob/master/apis/gamelift-2015-10-01.normal.json#L1181-L1191