String v1.0.0 published on Friday, Oct 28, 2022 by Pulumi
str.regexp.replace
Explore with Pulumi AI
A regex based replace on a string.
The underlying regexp engine is the go “regexp” stdlib package. You can see details at for available patterns at https://pkg.go.dev/regexp/syntax.
Using replace
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function replace(args: ReplaceArgs, opts?: InvokeOptions): Promise<ReplaceResult>
function replaceOutput(args: ReplaceOutputArgs, opts?: InvokeOptions): Output<ReplaceResult>
def replace(new: Optional[str] = None,
old: Optional[str] = None,
string: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> ReplaceResult
def replace_output(new: Optional[pulumi.Input[str]] = None,
old: Optional[pulumi.Input[str]] = None,
string: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[ReplaceResult]
func Replace(ctx *Context, args *ReplaceArgs, opts ...InvokeOption) (*ReplaceResult, error)
func ReplaceOutput(ctx *Context, args *ReplaceOutputArgs, opts ...InvokeOption) ReplaceResultOutput
> Note: This function is named Replace
in the Go SDK.
public static class Replace
{
public static Task<ReplaceResult> InvokeAsync(ReplaceArgs args, InvokeOptions? opts = null)
public static Output<ReplaceResult> Invoke(ReplaceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<ReplaceResult> replace(ReplaceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: str:regexp:replace
arguments:
# arguments dictionary
The following arguments are supported:
replace Result
The following output properties are available:
- Result string
- The input "string" where each pattern matching "old" is replaced by "new".
- Result string
- The input "string" where each pattern matching "old" is replaced by "new".
- result String
- The input "string" where each pattern matching "old" is replaced by "new".
- result string
- The input "string" where each pattern matching "old" is replaced by "new".
- result str
- The input "string" where each pattern matching "old" is replaced by "new".
- result String
- The input "string" where each pattern matching "old" is replaced by "new".
Package Details
- Repository
- str pulumi/pulumi-str
- License