Status: Accepted
Owner: pekka.klarck
CC: marcinet
Labels: Type-Enhancement Target-2.1 Priority-Low

New issue 285 by pekka.klarck: Deprecate BuiltIn keyword `Grep` in favour of better keywords in String library
http://code.google.com/p/robotframework/issues/detail?id=285

`Grep` keyword in BuiltIn has a confusing and hard-to-use signature with
patterns and pattern types. Now that we are going to have a dedicated
String library in 2.1 (issue 18) we can deprecate `Grep` and have these new
keywords in String:

Get Lines Containing String [string, pattern, case_insensitive=False]
- Returns all lines from the `string` that contain given `pattern` string
- If anything given to `case_insensitive` matching is case-insensitive (but
lines are of course returned in original format)
- Lines are returned as a single string catenated with a newline

Get Lines Matching Pattern [string, pattern, case_insensitive=False]
- Same as above but `pattern` can contain * and ? as wildcards and it must
match the whole line

Get Lines Matching Regexp [string, pattern]
- Same as above but `pattern` is considered a regular expression
- No need to have `case_insensitive` because a flag can be added to the
pattern (and simply lowercasing lines and patterns would not be adequate
with regexps)



--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply via email to