i'm just starting out and i've currently got a program someone else deisgned and am trying to fix a broken element within it... so that aside, it is basically an xml highlighting link engine. The engine searches for specific words from a list, as well as non-lexicon phrases, so any combinations break the xml. i devised a rough patch to fix the broken xml, but due to the way it searches, if it finds one, it will interrupt the phrase or list of words.
specifically it's for reports, and within the program it searches, in order:
1.nonlexicon phrases
2.dates
3.(list of phrases to look for)
4.locations
is there anyway i can create something to scan the arrays to find out if any could be contained within eachother?
if i place non-lexicon last, it will not find non-lexicons should a location/date/phrase that resides within the non-lexicon
i was talking to a friend, who's currently on vacation, and he mentioned creating something to scan each word within an array to see if that term/phrase would match any other term/phrase (or portion therein) to kill duplicates
any ideas the direction to go for this?
my current patch is ugly but it fixes a part of it:
(the way i have it broken down for editing)
term one and 3 being a non-lexicon and term2 being a word/phrase actually searched for.
this is actually one of my smallest sample strings.. i had one going to.. 50 some-odd temporary variables.
massive apologies for the large amount of text
my extreme gratitude for any help.
specifically it's for reports, and within the program it searches, in order:
1.nonlexicon phrases
2.dates
3.(list of phrases to look for)
4.locations
is there anyway i can create something to scan the arrays to find out if any could be contained within eachother?
if i place non-lexicon last, it will not find non-lexicons should a location/date/phrase that resides within the non-lexicon
i was talking to a friend, who's currently on vacation, and he mentioned creating something to scan each word within an array to see if that term/phrase would match any other term/phrase (or portion therein) to kill duplicates
any ideas the direction to go for this?
my current patch is ugly but it fixes a part of it:
(the way i have it broken down for editing)
Code:
$FileContents=~s/
<a href..name=
($term1)
<ahref..name=
($term2)
\"\>
($term2)
($term3)
\"\>
($term1)
<ahref..name=
($term2)
\"\>
($term2)
\<\/a\>
($term3)
\<\/a\>
/
<a href..name=
$1
\"\>
$5
\<\/a\>
<a href..name=
$2
\"\>
$3
\<\/a\>
<a href..name=
$4
\"\>
$8
\<\/a\>
/gi;
this is actually one of my smallest sample strings.. i had one going to.. 50 some-odd temporary variables.
massive apologies for the large amount of text
my extreme gratitude for any help.