regex help - 15/07/03 04:04 AM
what does the //o modifier and //c ?
and what does the m' and m!word! and m{word} ?
and what does the m' and m!word! and m{word} ?
alias filtertest { write -c ftest.txt $+(rc1,$crlf,rc2,$crlf,rc3) close -@ @@ window -C @@ -1 -1 300 200 if $1 == 1 { filter -fwg ftest.txt @@ /mim1rc1i/ } elseif $1 == 2 { filter -fwg ftest.txt @@ mim1rc1i } }
A dollar character is an assertion which is true only if the current matching point is at the end of the subject string, or [color:blue]immediately before a newline character that is the last character in the string (by default).[/color] ........ ........ The meanings of the circumflex and dollar characters are changed if the PCRE_MULTILINE option is set. When this is the case, they match immediately after and immediately before an internal newline character, respectively, in addi- tion to matching at the start and end of the subject string. For example, [color:blue]the pattern /^abc$/ matches the subject string "def\nabc" in multiline mode, but not otherwise.[/color] Conse- quently, patterns that are anchored in single line mode because all branches start with ^ are not anchored in multi- line mode, and a match for circumflex is possible when the startoffset argument of pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set.