split text file

P

pc

hi all,

this is a newb-q:

I have text files that contain somewhere in their middle a start tag
and an end tag.

eg
xxxxxxxxxxzzzzzzzzzzyyyyyyyystartsometexthereendxxxxxxxxxzzzzzzzzzzyyyyyy

I want to trim the file so that it will now only contain

startsometexthereend

Help! What would be the simplest way of accomplishing this?

Any assistance would be much appreciated

TIA

eddiec :)
 
E

Eric J. Roode

hi all,

this is a newb-q:

I have text files that contain somewhere in their middle a start tag
and an end tag.

eg
xxxxxxxxxxzzzzzzzzzzyyyyyyyystartsometexthereendxxxxxxxxxzzzzzzzzzzyyyyyy

I want to trim the file so that it will now only contain

startsometexthereend

Help! What would be the simplest way of accomplishing this?

A regular expression, probably. One that includes both "start" and "end".

What have you tried so far?

--
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,161
Latest member
GertrudeMa
Top