Problem mit regulären Python-Ausdrücken, was bedeutet (?i)?
仅有的幸福
仅有的幸福 2017-05-18 11:00:09
0
1
2524

filter(re.compile('(?i)([qwertyuiop]|[asdfghjkl]|[zxcvbnm]*)$').match, Words)
Wie oben ist dies eine Python-Anweisung, (?i) was bedeutet?

仅有的幸福
仅有的幸福

Antworte allen(1)
仅有的幸福

(?aiLmsux)
(One or more letters from the set 'a', 'i', 'L', 'm', 's', 'u', 'x'.) The group matches the empty string; the letters set the corresponding flags: re.A (ASCII-only matching), re.I (ignore case), re.L (locale dependent), re.M (multi-line), re.S (dot matches all), and re.X (verbose), for the entire regular expression. (The flags are described in Module Contents.) This is useful if you wish to include the flags as part of the regular expression, instead of passing a flag argument to the re.compile() function.

Note that the (?x) flag changes how the expression is parsed. It should be used first in the expression string, or after one or more whitespace characters. If there are non-whitespace characters before the flag, the results are undefined.

忽略大小写

Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage