-
Bug
-
Resolution: Duplicate
-
Minor
-
None
...
def testString = "Multi line"
def testStringReplaced = ( testString.replaceAll(~/(line)/,
) )
echo testStringReplaced
...
This block produces output: lineline
I expect it to produce: Multi lineline
- duplicates
-
JENKINS-46358 Support String.eachMatch, String.findAll in Pipeline
-
- Resolved
-
[JENKINS-39944] String::replaceAll method in groovy script works not as described in man.
Description |
Original:
... def testString = "Multi line" def testStringReplaced = ( testString.replaceAll(~/(line)/, { it[0] + it[0] }) ) echo testStringReplaced ... This block produce output: lineline I expect it to produce: Multi lineline |
New:
... def testString = "Multi line" def testStringReplaced = ( testString.replaceAll(~/(line)/, { it[0] + it[0] }) ) echo testStringReplaced ... This block produces output: lineline I expect it to produce: Multi lineline |
Link |
New:
This issue duplicates |
Resolution | New: Duplicate [ 3 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |