Reputation: 365
How can I match the pattern 2.0.0.xxx in lua? I want a pattern which can match all such patterns.
2.0.0.xxx
Example:
If a = 2.0.0.100 and b=2.0.0.200 c= 2.1.0.122 d=2.0.1.122 only a and b should match the pattern
a = 2.0.0.100 and b=2.0.0.200 c= 2.1.0.122 d=2.0.1.122
Upvotes: 1
Views: 463
Reputation: 122503
This pattern works:
"2%.0%.0%.%d%d%d"
Upvotes: 3