Extracted from Pike v8.0 release 164 as of 2016-02-09.
   

Method Regexp.PCRE.Plain()->replace1()


Method replace1

string replace1(string subject, string|function(string:string) with)

Description

replace one (first) occurance of a pattern in a subject

example:

> Regexp.PCRE("b[^-]*m")->replace1("abam-boom-fooabadoom","gurka"); Result: "agurka-boom-fooabadoom"