Skip to content
Advertisement

Replace very near word to a number with another word [closed]

Replace very near string to a number with another string

JavaScript

How to replace first d before time (number) with another character f.it should be as below

JavaScript

OR ,

How to Replace cell with header .

JavaScript

it should be as below

JavaScript

Advertisement

Answer

Following solution will search for any number and if found it will start polling backwards to search d in the string and if found replace it with b.

Sample input:

JavaScript

Solution using awk:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement