@Ricardo-Barroso
So this may serve your needs. I am making some assumptions from the limited information you provided and actually your last post is somewhat contradictory to your first. I shall expand on that later.
So you mentioned regular expressions (regex) I am hoping you might be able to understand what my solution is doing. As we always suggest, start slowly, by finding and replacing in single line mode, before unleashing the regex on an entire file with the “Replace All” option.
In the Replace function we have:
Find What:(RequiredItem\("[^"]+", *)(\d+)
Replace With:${1}0
Make sure the search mode is “regular expression” and I’d suggest making sure the cursor is at the very start of the file, before clicking on the “Replace” button. Do the “Replace” option first, checking what each line was replaced with, before clicking on the “Replace All” once happy with the result.
So talking to the differing information you provided, you had alluded to wanting to achieve this on “some” different lines, but possibly “not all” lines. That was the clarity we needed to know. In the short post you stated only the “RequiredItem” lines, hence my solution here.
My solution will, as I say, only work on certain lines. You could easily replace the “RequiredItem” text with one from another line you want to do further replacements. If so, then again run it in single line mode to make sure it still works for you.
I will try to describe a part of the regex for you, specifically "[^"]+". It starts with the double quote first, then the [ and ] refer to a group of characters contained within, albeit the first one here is a ^, which is special and means “NOT the following character”. So basically it means select another character as long as it is NOT a double quote. The trailing + means as many as possible of the preceding group. Then lastly we have the trailing double quote.
So have a go, and if you do have more questions or need further help please do ask. But please remember people here give their time freely and to have to go back and forth many times in an attempt to get more clarity will often turn us right off.
Terry
PS, I should say, the red text of the regex can be copied and pasted directly, that way no issues with bad typing