Jump to content

Capturing empty data and adding text


Recommended Posts

Iam trying to capture an empty space/ string between two texts, but also want to add text to it.

 

Reason for Impact:
NA
Recovery Action:
NA
Start Time (CST):
07-Mar-2023 02:02 AM
End Time (CST):
NA
Vendor Ticket:
Notification:

 

So between Vendor Ticket: and Notification if empty add NA

Link to comment
Share on other sites

Link to comment
Share on other sites

Local $Str = ClipGet()
ConsoleWrite($str & @CRLF)

$Str = StringReplace($Str, "Vendor Ticket:" & @CRLF & "Notification:", "Vendor Ticket:" & @CRLF & "NA" & @CRLF & "Notification:")

ConsoleWrite($str & @CRLF)

#cs
Reason for Impact:
NA
Recovery Action:
NA
Start Time (CST):
07-Mar-2023 02:02 AM
End Time (CST):
NA
Vendor Ticket:
Notification:
#CE

 

Edited by ioa747

I know that I know nothing

Link to comment
Share on other sites

what is the source of the text?

if it is a single text it will change all , no matter how much it is

when it finds
Vendor Ticket:
Notification:
it will change it with
Vendor Ticket:
NA
Notification:

Edited by ioa747

I know that I know nothing

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...