Problem z RegExp
- Author
- Message
-
Offline
- Posts: 282
- Joined: Thu Sep 10, 2015 9:53 am
- Location: Deutschland
Problem z RegExp
2+5-7=0
To jest OK.
[+][0-9]
[+]\d
a to nie działa
"Błąd składni (2)"
[-][0-9]
[-]\d
Jak powinno być to poprawnie napisane?
To jest OK.
[+][0-9]
[+]\d
a to nie działa
"Błąd składni (2)"
[-][0-9]
[-]\d
Jak powinno być to poprawnie napisane?
-
Offline
- Posts: 282
- Joined: Thu Sep 10, 2015 9:53 am
- Location: Deutschland
Problem z RegExp.
Chcę poszukać wyrazy, w których druga litera jest: b
W tym przykładzie jest obok
"dwóch jedynek, obok siebie"
Ten zapis nie działa: (\b .b)
gdy przed nim są w tekście znaki :,.';"
Jak powinien wyglądać poprawny zapis?
W Google'u nie mogę tego znaleźć.
W tym przykładzie jest obok
"dwóch jedynek, obok siebie"
Ten zapis nie działa: (\b .b)
gdy przed nim są w tekście znaki :,.';"
Jak powinien wyglądać poprawny zapis?
W Google'u nie mogę tego znaleźć.
-
Offline
- Posts: 282
- Joined: Thu Sep 10, 2015 9:53 am
- Location: Deutschland
RegExp problem.
I want to find words in which the second letter is "c"
Tester:
here False
Tester:
here False
Last edited by sexy96 on Sun Feb 05, 2017 10:42 am, edited 1 time in total.
-
Offline
- Posts: 2247
- Joined: Tue Aug 07, 2007 2:03 pm
- Location: Vinnitsa, Ukraine
Code: Select all
\b\wc
\w-word character
PS: looks like regex 101 fails to recognize "ę"as single char (it is seen as e + diacritic codepoint so it fail to recognize it as non-delimiter). Well, you should find out what is official position of regex implementors/standards.
-
Offline
- Posts: 282
- Joined: Thu Sep 10, 2015 9:53 am
- Location: Deutschland
RegExp problem.
linia$(1) = "[Buttonbar]": linia$(2) = TextLinii$(2)
ReDim Preserve TextLinii$(nn%)
Buttoncount = Right(TextLinii$, Len(TextLinii$ - 2))
2+3
Buttoncount = Right(TextLinii$, Len(TextLinii$ - 2))
Kod: .*= Right\(.*Len\(.*
https://regex101.com
AkelPad:
Why the difference?
ReDim Preserve TextLinii$(nn%)
Buttoncount = Right(TextLinii$, Len(TextLinii$ - 2))
2+3
Buttoncount = Right(TextLinii$, Len(TextLinii$ - 2))
Kod: .*= Right\(.*Len\(.*
https://regex101.com
AkelPad:
Why the difference?
Last edited by sexy96 on Sun Feb 05, 2017 10:43 am, edited 1 time in total.
-
Offline
- Posts: 874
- Joined: Sat Jan 16, 2010 2:03 pm
sexy96
Symbol "dot" (.) in AkelPad can be interpreted in two ways: "dot '.' matches any single character (default)" or "dot '.' matches any single character, except newline character".
See "AkelHelp-Eng.htm" --> "Regular expression syntax" --> (?options):
The second way is to use script "FindReplaceEx.js". It is most similar to "regex101.com"
Symbol "dot" (.) in AkelPad can be interpreted in two ways: "dot '.' matches any single character (default)" or "dot '.' matches any single character, except newline character".
See "AkelHelp-Eng.htm" --> "Regular expression syntax" --> (?options):
You can use that option "directly" in expression or you can check it in form "Find" (look at the small triangle to the right of option "[ ] Regular expressions ▼")(?s) dot '.' matches any single character (default).
(?-s) dot '.' matches any single character, except newline character.
The second way is to use script "FindReplaceEx.js". It is most similar to "regex101.com"
-
Offline
- Posts: 282
- Joined: Thu Sep 10, 2015 9:53 am
- Location: Deutschland
RegExp problem.
I would look "only" the number contained in parentheses
without marking the brackets.
I know it does not matter, but if it can be done?
without marking the brackets.
I know it does not matter, but if it can be done?
Last edited by sexy96 on Sun Feb 05, 2017 10:44 am, edited 1 time in total.
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland