My programming knowledge is very limited, I would really appreciate any help on this possibly obvious problem!
Lets say I have a text file, that somewhere contains the text: “I own two (Some text in between…) bicycles.”
How could I for example change two to three? Meaning I need a function to find the string “bicycles” and then look to the left until it somewhere finds the string “two” and changes that.
With regular expressions:
result
.
It is also possible without regular expressions:
results are the same
.
But using regular expressions give more possibilities:
result