diff --git a/powershell/plugins/create-commands-v2.ts b/powershell/plugins/create-commands-v2.ts index 47f646c1b3..d339bac7ad 100644 --- a/powershell/plugins/create-commands-v2.ts +++ b/powershell/plugins/create-commands-v2.ts @@ -377,7 +377,7 @@ export /* @internal */ class Inferrer { async addVariant(vname: string, body: Parameter | null, bodyParameterName: string, parameters: Array, operation: Operation, variant: CommandVariant, state: State, preOperations: Array | undefined, commandType?: CommandType): Promise { // beth: filter command description for New/Update command - const createOrUpdateRegex = /(creates? or updates?)|(creates?)|(updates?)/gi; + const createOrUpdateRegex = /^(creates? or updates?)|^(creates?)|^(updates?)/i; operation.language.default.description = operation.language.default.description.replace(createOrUpdateRegex, `${variant.action.capitalize()}`); const op = await this.addCommandOperation(vname, parameters, operation, variant, state, preOperations, commandType);