Im trying to strip the text lenght of text between two html tags.
I restrict to the text between the wanted tag, and have tried different FIND/REPLACE regex expression in a subfilter.
Example: <a>this is a sample text between an html tag pair </a>
Wanted output: <a>this is a sample... </a>
(only 16 characters and adding "...")
Do anyone have any sugesstions how to use regex with FIND/REPLACE to count the lenght and strip of unwanted characters?
FIND/REPLACE with REGEX
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
-
- Posts: 5
- Joined: Wed Mar 18, 2009 12:24 pm
Re: FIND/REPLACE with REGEX
Thank You so much
I obviously have missed something important when reading the docs...
But still a bit confused about "$1", is this a variable I have to declare or is this an TextPipe "internal container" always containg the last search match?
Regards
I obviously have missed something important when reading the docs...
But still a bit confused about "$1", is this a variable I have to declare or is this an TextPipe "internal container" always containg the last search match?
Regards
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: FIND/REPLACE with REGEX
The latter is correct - $1 is a placholder that contains the first bracketed (...) part of a match. $2 holds the 17 characters and onwards.