Page 1 of 1

Find (some text and other characters) at the end of lines

Posted: Thu May 22, 2008 2:30 pm
by jpg
Hi i need to find "(some text and other characters)" at the end of lines

Example

Art. 37. Os serviços (art 234) de (Partes mantidas ional)
Art. 38. seguintes (partes 1º) e cláusulas (Redação nº 10)

Only have to find

(Partes mantidas ional)
and
(Redação nº 10)


Thasnks

Posted: Thu May 22, 2008 3:10 pm
by Bob Hansen
Assuming all lines have the same format as what was provided, try this untested replacement:

Search for: ^.*\(.*\).*(\(.*\))\n
Replace with: \1\n

Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------

Posted: Thu May 22, 2008 3:12 pm
by jpg
Not all lines have (asdas) in the middle of line and some lines may heva several (as) (asdasd) in the middle only i need the (asdas) at the end of the line

Posted: Thu May 22, 2008 3:23 pm
by Bob Hansen
Try this....
Search for: ^.*(\(.*\))\n
Replace with: \1\n

I don't have access to test these right now, so suggestions are untested....

Posted: Thu May 22, 2008 4:12 pm
by jpg
WORKS PERFECT

THANKS