Page 1 of 1

Moving data around from a file

Posted: Mon Mar 01, 2010 9:58 pm
by xyber
Hey there,

I am wondering if textpipe is able to give a pattern like a variable name and if we can move this variable around from in the file. For example, if i have this html file, can i move the text "Welcome to Streetdirectory.in" outside of the body tag? Basically i want to know if its possible to move data around from the file that it is being processed.

Code: Select all

<html>
<head>
<title>Welcome to StreetDirectory.com</title>
</head>
<Body><H4> Welcome to Streetdirectory.in</H4>
</body>
</html>
Thank you.

Rgrds.

Re: Moving data around from a file

Posted: Tue Mar 02, 2010 10:40 am
by DataMystic Support
Yes, but you must match the desired text as well as its target location in one shot.

e.g. to move some body text into the title tag:

Code: Select all

<html>
<head>
<title>[ 1+ chars ]</title>
</head>
<Body><H4>[ capture( 1+ chars ) ]</H4>
</body>
</html>
Replace with

Code: Select all

<html>
<head>
<title>$1</title>
</head>
<Body><H4>$1</H4>
</body>
</html>