Skip to content

Commit

Permalink
parsing: Add warning for escaping functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Makman2 committed Mar 3, 2015
1 parent a8b11cf commit d49bc7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions coalib/parsing/StringProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def escaped_split(pattern,
Splits the given string by the specified pattern. The return character (\n)
is not a natural split pattern (if you don't specify it yourself).
This function handles escaped split-patterns.
CAUTION: Using the escaped character '\' itself in the pattern the function
can return strange results. The backslash can interfere with the
escaping regex-sequence used internally to split.
:param pattern: The pattern that defines where to split.
Providing regexes (and not only fixed strings)
is allowed.
Expand Down Expand Up @@ -175,6 +178,10 @@ def escaped_search_in_between(begin,
Searches for a string enclosed between a specified begin- and end-sequence.
Also enclosed \n are put into the result.
Handles escaped begin- and end-sequences.
CAUTION: Using the escaped character '\' itself in the begin- or
end-sequences the function can return strange results. The
backslash can interfere with the escaping regex-sequence used
internally to match the enclosed string.
:param begin: The begin-sequence where to start matching.
Providing regexes (and not only fixed strings)
is allowed.
Expand Down

0 comments on commit d49bc7e

Please sign in to comment.