Hello community!
In this above image as you can see there is text format like this 9830076257Y YO
So i want that in front of 9830076257Y YY
That YO or YN should replaced with YY this whole data is in notepad.
What logic i can apply?
Hello community!
In this above image as you can see there is text format like this 9830076257Y YO
So i want that in front of 9830076257Y YY
That YO or YN should replaced with YY this whole data is in notepad.
What logic i can apply?
Read the image data using Read text with ocr then save it in a string
YourString.Replace(“YO”,“YY”).Replace(“YN”,“YY”)

Can you check:
We would work with Regex.Replace(strTestVar, strPatternVar, strReplaceString)
[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum
@rlgandu but sometime this code is replacing the name YO or YN in notepad.
Hey @Priyesh_Shetty
if you are looking regex expression you can try this:
System.Text.RegularExpressions.Regex.Replace(inputText, "98[0-9]{8}Y Y[ON]", "98$1YY")
str_Text.Replace("YO","YY").Replace("YN","YY")
Hope it will helps you ![]()
Cheers!!
System.Text.RegularExpressions.Regex.Match(YourString,"\d{5,}[A-Z]+\s[A-Z]+").ToString.Replace("YO","YY").Replace("YN","YY")
@rlgandu this is giving wrong name actually
Please put the notepad file so it will be easy to replace "YO"and “YN” to “YY”
If it contains senstive information then give me a sample data
I want notepad data
@rlgandu due to security purpose cant share the file.
According to your input I find @GMAIL.COM as static may be you could use the below syntax:
System.Text.RegularExpressions.Regex.Match(Input,"(?<=\@GMAIL.COM\s*).*").Value.Trim().ToString.Replace("YO","YY").Replace("YN","YY")
Hope it helps!!
@Priyesh_Shetty
Can you text me personally
Hello! To achieve this in Notepad, you can use the “Find and Replace” feature. Open your Notepad document, press “Ctrl + H” to bring up the Find and Replace dialog. In the “Find what” field, enter “9830076257Y YO” (without quotes), and in the “Replace with” field, enter “9830076257Y YY”. Then, click on “Replace All”. This will replace all occurrences of “9830076257Y YO” with “9830076257Y YY” in your document. If there are variations like “9830076257Y YN,” you can repeat the process by searching for “9830076257Y YN” and replacing it with “9830076257Y YY.” Make sure to save your document after making the changes.
Regards