I'm looking to extend the regex
below so I can have unlimited number of braces.
((?:{[0-9]:[a-z]+})?)
So my string can handle {1:foo}{2:bar}{3:more}
Any ideas will 开发者_JAVA技巧be appreciate it!
Which function are you using in PHP for matching the expression? Using preg_match_all should work for you with the follow regex: /\{([0-9]):([a-z]+)\}/
精彩评论