Réalisées par des traducteurs professionnels, des entreprises, des pages web ou traductions disponibles gratuitement.
firstnonspace: match only, if the string is the first non-whitespace in the line. default: false.
firstnonspace: Соответствие, только если строка начинается не с пробела. По умолчанию: false.
Dernière mise à jour : 2011-10-23
Fréquence d'utilisation : 1
Qualité :
regular expressions are easy to use but often there is another much faster way to achieve the same result. consider you only want to match the character '# 'if it is the first character in the line. a regular expression based solution would look like this: lt; regexpr attribute=quot; macroquot; context=quot; macroquot; string=quot; ^\\s*#quot; / gt; you can achieve the same much faster in using: lt; detectchar attribute=quot; macroquot; context=quot; macroquot; char=quot; #quot; firstnonspace=quot; truequot; / gt; if you want to match the regular expression '^#' you can still use detectchar with the attribute column=quot; 0quot;. the attribute column counts character based, so a tabulator still is only one character.
Регулярные выражения несложны в использовании, но очень часто можно найти более быстрый способ. Допустим, вы ищете символ '#', это первый символ строки. Решение с регулярным выражением будет выглядеть примерно так: lt; regexpr attribute=quot; macroquot; context=quot; macroquot; string=quot; ^\\ s * # quot; / gt;. Этой же цели можно достичь значительно быстрее: lt; detectchar attribute=quot; macroquot; context=quot; macroquot; char=quot; # quot; firstnonspace=quot; truequot; / gt;. Для поиска регулярного выражения '^ #' можно применить detectchar с атрибутом column=quot; 0quot;. Отсчет для атрибута column идет посимвольно, поэтому знак табуляции для него - всего один символ.
Dernière mise à jour : 2011-10-23
Fréquence d'utilisation : 1
Qualité :