You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The ?: inside the group (?:\+\+|#) just make the group non capturing. The (?<!S) and (?!\S) are called lookarounds, and assert that either whitespace or the start/end precedes/follows the match
132
+
# The ?: inside the group (?:\+\+|#) just make the group non capturing. The (?<!S) and (?!\S) are called lookarounds, and assert that either whitespace or the start/end precedes/follows the match.
133
+
# (?<!S) is negative lookbehind
134
+
# Meaning: Asserts that the current position in the string is not preceded by a non-whitespace character (\S).
135
+
# Effect: This effectively matches locations that are preceded by a whitespace character (\s) or the beginning of the string (BOS), without including the whitespace character itself in the final match.
136
+
# (?!\S) is negative lookahead
137
+
# Meaning: Asserts that the current position in the string is not followed by a non-whitespace character (\S).
138
+
# Effect: This effectively matches locations that are followed by a whitespace character (\s) or the end of the string (EOS), without including the following character in the final match.
133
139
# matches to be the entire input string
134
140
cpp_csharp_regex=r"^C(?:\+\+|#)?$"
135
141
# matches perhaps as part of a larger string, with the matches surrounded by whitespace
0 commit comments