View Single Post
Elit59
Member
Join Date: Feb 2016
Old 05-07-2023 , 00:55   Re: Map Tiers Length problem
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
"\w" in Regex is not for white space, it is for word characters (equivalent to "[a-z_]"). I would recommend that your INI file be the more traditional key-value pairs using "=" (like you see in the lang files). Then, you can get rid of regex entirely and just split based on "=", then trim each side and validate that the right side is not an empty string before using it. This will also be much more efficient.

If you do use regex for some reason, you don't need any of the parentheses if you're not actually using submatches or regex patterns that actually require them (which you aren't using).
would you write an example?
Elit59 is offline