Namitha
Namitha

Reputation: 365

How to match pattern 2.0.0.XXX in lua?

How can I match the pattern 2.0.0.xxx in lua? I want a pattern which can match all such patterns.

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

Upvotes: 1

Views: 463

Answers (1)

Yu Hao
Yu Hao

Reputation: 122503

This pattern works:

"2%.0%.0%.%d%d%d"

Upvotes: 3

Related Questions