Originally Posted By: argv0
Originally Posted By: Wims
Yes it is, \s in pcre match the ascii values 9, 10, 12, 13 and 32.


Yes, but since /filter returns only a single line at a time, it can never match 10 or 13, therefore your example of "alias\nalias_test" will never match. Please test your statements before making them.

Originally Posted By: Wims
is rather wrong if we consider that the original intention was to match indented code


Indentation never uses tabs, so if the code is correctly formatted it will work fine. I don't write code with the assumption of bad input. That's an exercise I leave up to users.

In general, I think you're blowing the "wrongness" out of proportion, but feel free to fix it rather than complain. You could easily replace \s with " ". I've had no problems using it with any of my scripts, so it can't be that wrong.


I think wims was listing cases where your pattern is false.
Just as a test-case, we'll use this as the pattern (in other words, ignoring if it came from a .ini):
Code:
/^(?:alias\s+(?:-l\s+)?)?\/?([^\{ \[#;]+).*$/


Just type this into your mIRC:
Code:
//echo -a $regex(alias,/^(?:alias\s+(?:-l\s+)?)?\/?([^\{ \[#;]+).*$/)
//echo -a $regex(alias_test,/^(?:alias\s+(?:-l\s+)?)?\/?([^\{ \[#;]+).*$/)


Both regex patterns will match.