Page 1 of 1

Parse text with ( in it

Posted: Mon Jan 24, 2011 5:35 pm
by steve1040
I have several lines of text that look like this:


ABS - Title1 (SYS-1121) (Fillable).pdf ( 200 KB )
ABS Something-High Here Orders and MAR (SYS-1122) (Fillable).pdf ( 247 KB )
ACT Low Something Orders and MAR (SYS-1342) (Fillable).pdf ( 254 KB )
MI ThisHere with Something (SYS-1560) (Fillable).pdf ( 120 KB )
Adult Attention Form (SYS-1782) (fillable) PSC.pdf ( 109 KB )

I need to get 2 fields from the lines into pipe delimited fields

So
Needed Result

ABS - Title1|SYS-1121
ABS Something-High Here Orders and MAR|SYS-1122
ACT Low Something Orders and MAR|SYS-1342
MI ThisHere with Something|SYS-1560
Adult Attention Form|SYS-1782

Posted: Mon Jan 24, 2011 7:37 pm
by ben_josephs
Use "Posix" regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
Search | Replace... (<F8>):
Find what: ([^(]*) \(([^)]+)\).*
Replace with: \1|\2

[X] Regular expression

Replace All