Help me Replace in line
-
help me please I need to replace all the numbers 5 of several files in a specific line I was using the tool to replace everything, but I need to remove only one line specifically line 16
-
- FIND WHAT =
(?-s)\A^(.*\R){15}^.*?\K5
- REPLACE WITH =
[REPLACEMENT]
- REPLACE ALL (multiple times)
will change
5 one 5 0 3 5 two 5 0 3 5 three 5 0 3 5 four 5 0 3 5 five 5 0 3 5 six 5 0 3 5 seven 5 0 3 5 eight 5 0 3 5 nine 5 0 3 5 ten 5 0 3 5 eleven 5 0 3 5 twelve 5 0 3 5 thirteen 5 0 3 5 fourteen 5 0 3 5 fifteen 5 0 3 5 sixteen 5 0 3 5 seventeen 5 0 3
into
5 one 5 0 3 5 two 5 0 3 5 three 5 0 3 5 four 5 0 3 5 five 5 0 3 5 six 5 0 3 5 seven 5 0 3 5 eight 5 0 3 5 nine 5 0 3 5 ten 5 0 3 5 eleven 5 0 3 5 twelve 5 0 3 5 thirteen 5 0 3 5 fourteen 5 0 3 5 fifteen 5 0 3 [REPLACEMENT] sixteen [REPLACEMENT] 0 3 5 seventeen 5 0 3
If this is not sufficient, I suggest explaining yourself better with example before and after data formatted as data, and otherwise follow all the advice that I will quote below; if you choose to ignore some or all of this advice, you will find that the answers you get are not overly helpful, because you’re making us guess, and we will guess wrong (in total or in part).
----
Do you want regex search/replace help? Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you. All example text should be marked as plain text using the
</>
toolbar button or manual Markdown syntax. Screenshots can be pasted from the clipboard to your post usingCtrl+V
to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have and the text you want to get from that data; include examples of things that should match and be transformed, and things that don’t match and should be left alone; show edge cases and make sure you examples are as varied as your real data. Show the regex you already tried, and why you thought it should work; tell us what’s wrong with what you do get… Read the official NPP Searching / Regex docs and the forum’s Regular Expression FAQ. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries. - FIND WHAT =