Get help with installation and running here.
Moderators: DataMystic Support, Moderators
-
thenquirer
- Posts: 3
- Joined: Mon Mar 22, 2010 1:41 am
Post
by thenquirer » Mon Mar 22, 2010 1:46 am
Hello there,
How do i remove anything before a word in a text passage. For example,
What Petraeus said is this: "The [Israeli-Arab] conflict foments anti-American sentiment, due to a perception of U.S. favoritism for Israel. Arab anger over the Palestinian question limits the strength and depth of U.S. partnerships with governments and peoples ? and weakens the legitimacy of moderate regimes in the Arab world. Meanwhile, al-Qaida and other militant groups exploit that anger to mobilize support. The conflict also gives Iran influence in the Arab world through its clients, Lebanese Hizballah and Hamas."
How do i remove anything before the word <"The>.
-Thenq.
-
DataMystic Support
- Site Admin
- Posts: 2230
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
-
Contact:
Post
by DataMystic Support » Mon Mar 22, 2010 10:53 am
Sounds like a troll to me, but use a perl pattern search/replace for:
Replace with
-
pakiyabhai
- Posts: 8
- Joined: Tue Feb 09, 2010 7:26 pm
Post
by pakiyabhai » Mon Mar 22, 2010 3:31 pm
this didn't work for me.
Did it work for you ? For me it doesn't do anything. I tried using perl search replace only
-
DataMystic Support
- Site Admin
- Posts: 2230
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
-
Contact:
Post
by DataMystic Support » Tue Mar 23, 2010 9:06 am
Works perfectly here - this is the pattern match:
Code: Select all
|--Perl pattern [^(.*)("The)] with [$2]
| [ ] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [X] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
| Maximum text buffer size 4096
| [ ] Maximum match (greedy)
| [ ] Allow comments
| [X] '.' matches newline
| [ ] UTF-8 Support
-
thenquirer
- Posts: 3
- Joined: Mon Mar 22, 2010 1:41 am
Post
by thenquirer » Tue Mar 23, 2010 9:29 am
Hi,
Can i know why the replacement is $2 instead of $1? If additional to removing the text infront, i want to remove everything after the text "to mobilize support.", what is the correct syntax and replacement that should be used?
-Thenq.
-
DataMystic Support
- Site Admin
- Posts: 2230
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
-
Contact:
Post
by DataMystic Support » Tue Mar 23, 2010 9:54 am
You could always read the manual...
$1 contains all the text prior to
"The
Use EasyPattern search/replace
Code: Select all
to mobilize support.[ longest 1+ not cr or lf ]
Replace with
-
thenquirer
- Posts: 3
- Joined: Mon Mar 22, 2010 1:41 am
Post
by thenquirer » Tue Mar 23, 2010 10:20 am
I did but i cant seem to search for symbols in the chm file. Sorry, i'm still trying to get used to it. I've been looking to manipulate data like texts, to remove before and after. Also to add strings if its not present. For example, if i want to add "Report Checked" to the end of the file if it does not exist, is it feasible? Thanks.
-Thenq.
-
DataMystic Support
- Site Admin
- Posts: 2230
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
-
Contact:
Post
by DataMystic Support » Tue Mar 23, 2010 4:18 pm
Yes, search for perl pattern:
Set Action to:
Send non-matching text to subfilter
Then Add an
Add Footer filter as a subfilter, with text of