List Info

Thread: Help with this search and replace




Help with this search and replace
user name
2005-12-29 19:39:33

I am working with a file that requires all lines to start
with 011.
However some of the appear in the middle of the string at
the end of
words and I need to move them onto seperate lines

ie if a find a string xxx011 in a sentence I have to insert
a newline
after the xxx to move the 011 and the onto a new line.

Is there a sed or an Eclipse search and replace that can fix
it?

Is there a way of labelling the different parts of match to
derive the
replacement string?

ie the match I need is [a-z]011. Is there a way to label the
2 parts
differently to such as 1 for [a-z] and 2 for 011 so I can
create a
replacement string like 1n2  ?

Yours

new to regexes

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )