Extract text between X and Y

Tool for Search and Replace across multiple files.
Post Reply
zeroist
Posts: 4
Joined: Thu Jul 03, 2014 4:37 am

Extract text between X and Y

Post by zeroist »

Hi everybody,

I have a folder containing nearly thousand files.All contaning something like this:

kfslkfjaşj ctl02_ctlIsDetayi_ctlGenelSartlar" style What I need to extract ctl02_ctlIsDetayi_ctlPanelMeslek" style dfsdf

Here is X: ctl02_ctlIsDetayi_ctlGenelSartlar" style
Here is Y: ctl02_ctlIsDetayi_ctlPanelMeslek" style

is there any way to extract the part of of" What I need to exctract" part.
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Extract text between X and Y

Post by DigitalVolcano »

You can use this in RegEx mode with the extract button:

RegEx:

Code: Select all

ctl02_ctlIsDetayi_ctlGenelSartlar"(.*?)ctl02_ctlIsDetayi_ctlPanelMeslek
Then using a text editor just replace the ctl02_ctlIsDetayi_ctlGenelSartlar and ctl02_ctlIsDetayi_ctlPanelMeslek phrases with nothing and you will have the text you want left over.
zeroist
Posts: 4
Joined: Thu Jul 03, 2014 4:37 am

Re: Extract text between X and Y

Post by zeroist »

Hi admin,

I Did as you said but "no match found"

Thanks for your help.Here is a sample doc.in sample ,what I need is yellow part

http://docdroid.net/eab5
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Extract text between X and Y

Post by DigitalVolcano »

If it's over multiple lines you need to try it with the "Dot Matches Newline" option ticked.
zeroist
Posts: 4
Joined: Thu Jul 03, 2014 4:37 am

Re: Extract text between X and Y

Post by zeroist »

"Dot Matches Newline" option was ticked.But the result is same. "no match found".Did/can you check doc below.


http://docdroid.net/eab5
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Extract text between X and Y

Post by DigitalVolcano »

Is the file you are trying to scan in Word (docx) format? TextCrawler will only read plain text docs.
zeroist
Posts: 4
Joined: Thu Jul 03, 2014 4:37 am

Re: Extract text between X and Y

Post by zeroist »

I convert it to plain text docs.it worked.thank you very much
Post Reply