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

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
jpg
Posts: 14
Joined: Fri Mar 28, 2008 10:21 pm

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

Post 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
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post 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
-----------------------------------------
Last edited by Bob Hansen on Thu May 22, 2008 3:14 pm, edited 1 time in total.
Hope this was helpful.............good luck,
Bob
jpg
Posts: 14
Joined: Fri Mar 28, 2008 10:21 pm

Post 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
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post 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....
Last edited by Bob Hansen on Thu May 22, 2008 8:31 pm, edited 1 time in total.
Hope this was helpful.............good luck,
Bob
jpg
Posts: 14
Joined: Fri Mar 28, 2008 10:21 pm

Post by jpg »

WORKS PERFECT

THANKS
Post Reply