vaishnavi Mukundhan wrote:hwo do i replace the word or by new line ?like if i do it with replaceAll function...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Stuart A. Burkett wrote:The first parameter of the replaceAll method is a regular expression, so you need to find a regular expression that matches 'or' with no other letters either side of it. There are plenty of regular expression tutorials on the web if you don't know much about them.
vaishnavi Mukundhan wrote:hwo do i replace the word or by new line ?like if i do it with replaceAll function it replaces or between the words also like in borrow th or is replaced .that is the b is in one line n the row is in the other. so i want to know a function that removes this for me
please do help
thank you
how do I replace the word "or" with a "newline" ? If i do it by calling the replaceAll() method, it replaces the "or" between the words too. For example, like in the word "borrow", the "or" sub-word is replaced. that is, the "b" is in one line and the "row" is in the other. I want to know a function that doesn't do this
vaishnavi Mukundhan wrote:
Stuart A. Burkett wrote:The first parameter of the replaceAll method is a regular expression, so you need to find a regular expression that matches 'or' with no other letters either side of it. There are plenty of regular expression tutorials on the web if you don't know much about them.
it would be really helpful if you can tell me how to represent or in regex? i urgently need it please
Ramesh-X
Campbell Ritchie wrote:
Welcome to the Ranchvaishnavi Mukundhan wrote: . . . i urgently need it please
![]()
Just think how much sooner you would have had answers if anybody could understand your question. And we don’t use words like urgently.
vaishnavi Mukundhan wrote:
Stuart A. Burkett wrote:The first parameter of the replaceAll method is a regular expression, so you need to find a regular expression that matches 'or' with no other letters either side of it. There are plenty of regular expression tutorials on the web if you don't know much about them.
it would be really helpful if you can tell me how to represent or in regex? i urgently need it please
Swastik
Swastik Dey wrote:Does it mean you wish to replace and/AND from every line with a new line character?
vaishnavi Mukundhan wrote:
vaishnavi Mukundhan wrote:
Stuart A. Burkett wrote:The first parameter of the replaceAll method is a regular expression, so you need to find a regular expression that matches 'or' with no other letters either side of it. There are plenty of regular expression tutorials on the web if you don't know much about them.
it would be really helpful if you can tell me how to represent or in regex? i urgently need it please
it's still not working.
this is my code . Its not giving the desired output.only "." is being replaced .
Please help![]()
Ramesh-X
vaishnavi Mukundhan wrote:
Swastik Dey wrote:Does it mean you wish to replace and/AND from every line with a new line character?
yeah.and also ","
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here