This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
vba:tutorials:regexptest [14.09.2017 11:31:39] yaslaw |
vba:tutorials:regexptest [14.09.2017 11:33:39] (current) yaslaw [Patterns bei cRegExp()] |
||
---|---|---|---|
Line 6: | Line 6: | ||
[[vba:cast:cregexp|cRegExp()]] akzeptiert analog zu PHP Patterns inklusive Modifiers. | [[vba:cast:cregexp|cRegExp()]] akzeptiert analog zu PHP Patterns inklusive Modifiers. | ||
- | > Neu. Beide Funktion sind in [[vba:functions:print_r:index#drx|dRx()]] zusammengefasst | + | > Neu. Seit print_r() Version 2.10.0 sind beide Funktion in der Methode [[vba:functions:print_r:index#drx|dRx()]] zusammengefasst. |
===== Patterns bei cRegExp() ===== | ===== Patterns bei cRegExp() ===== | ||
Line 34: | Line 34: | ||
<code vb>'Der Pattern ^([^\d]*[\.a-z])\s*(.*) mit dem Modifier IgnoreCase | <code vb>'Der Pattern ^([^\d]*[\.a-z])\s*(.*) mit dem Modifier IgnoreCase | ||
print_r cregexp("/^([^\d]*[\.a-z])\s*(.*)/i").execute("Haupt-Str. 11a") | print_r cregexp("/^([^\d]*[\.a-z])\s*(.*)/i").execute("Haupt-Str. 11a") | ||
+ | <IMatchCollection2> ( | ||
+ | [0] => <IMatch2> ( | ||
+ | [Match] => <String> 'Haupt-Str. 11a' | ||
+ | [FirstIndex] => <Long> 0 | ||
+ | [SubMatches] => <ISubMatches> ( | ||
+ | [0] => <String> 'Haupt-Str.' | ||
+ | [1] => <String> '11a' | ||
+ | ) | ||
+ | ) | ||
+ | ) | ||
+ | |||
+ | 'Mit dRx() | ||
+ | dRx "/^([^\d]*[\.a-z])\s*(.*)/i", "Haupt-Str. 11a" | ||
<IMatchCollection2> ( | <IMatchCollection2> ( | ||
[0] => <IMatch2> ( | [0] => <IMatch2> ( |