Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

10 369 Posts in 5 744 Topics- by 1 216 Members - Latest Member: santini862

22 September 2019, 20:34
Select Language English | Russian ru | German
Main PageIRC Client KVIrc forumRussian talksСкриптингВопросы по работе отдельных функций и команд$str.grep
Pages: [1]
Print
Author Topic: $str.grep  (Read 6722 times)
0 Members and 1 Guest are viewing this topic.
Victor
Новичок
*

Репутация: 1
Posts: 23


View Profile
« on: 7 October 2008, 13:20 »

по умолчанию $str.grep нечувствителен к регистру, а как правильно выставить регекспы что бы был чувствителен?
Logged
Voker57
Разработчик KVirc
*

Репутация: 9
Posts: 122


View Profile Email
« Reply #1 on: 7 October 2008, 13:51 »

Quote
$str.grep
Emulates the GNU Regular Expression Parser
Usage
$str.grep(<match>,<strings>[,<flags>])
Description
Returns an array with the elements of <strings> which match the string <match>. <flags> can be any combination of the characters 's','w' and 'r'.
If the flag 'w' is specified then <match> is assumed to be a wildcard regular expression (with * and ? wildcards). If the flag 'r' is specified then <match> is assumed to be a standard regular expression. If none of 'w' and 'r' is specified then <match> is treated as a simple string to be searched in each element of the <strings> array. 'r' takes precedence over 'w'. If the flag 's' is specified the matches are case sensitive.

$str.grep("^shit$","s")
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic