Ask a Question related to PERL Modules, Design and Development.
-
Rodney #1
Matching text question..
I'm having trouble matching only entire words.
If I run a search against a large block of text for the word: or
It will find 'or' in every word that contains it. ie; Word, Form, etc.
I want to only find entire words.
If I use the \s switch like this:
$TextToConvert =~ s/\sor\s/$TextToReplaceFoundTextWith/ig
It will not find the or if it is located at the beginning of a line, at
the end of a line or it has any punctuation next to it.
If I use the \W switch, the search will include and MarkUp Language Code and
replace it.
Can anyone give me idea?
Thanks.
--
....
`·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney
Rodney Guest
-
Text Matching
Hi everyone. I am working with an Illustrator 9.0 drawing that was given to my, drawn by someone else. I'm just trying to do some updating to it.... -
Input Text Matching Frustration
Hi: I've got an input field named "9bField" in the property inspector, and a button to submit a user response with the following script on it: ... -
simple pattern matching question
hi, I want to be able to see if a string of text contains one or more instances of the forward slash character(\) or the double quotation(")... -
Matching quoted text question...
I'm trying to place HTML Tags around the contents of Quoted material. I'm using the following PERL code: $TextBlockToConvert =~ s/"(.+?)"/"<FONT... -
and/or matching question
Hi, On a web form, I have two fields "US_State" and "Other_State". In my perl script I have.... &no_State unless $FORM{'US_State'}; How... -
Rodney #2
Re: Matching text question..
Thanks James!!!
That did the trick!
I spent the last 12 hours trying to figure that one out.
:))
--
....
`·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney
Rodney Guest
-
Rodney #3
Re: Matching text question..
I'm trying to place HTML Tags around the contents of Quoted material.
I'm using the following PERL code:
$TextBlockToConvert =~ s/"(.+?)"/"<FONT Color=BLUE>\1<\/Font>"/g;
Below, is an example of problem text this code chokes on.
Example Text: msgStop("", "Invalid date")
1. The 1st set of Quotes have no contents and so it is
simply ignored.
2. The code then finds the next set of Quotes... which is ", "
NOTE: These Quotes do not belong to the same pair.
The HTML formatting code is applied to the comma.
3. Finally, the last set of Quotes are ignored because the
code thinks there is only a single last Quote left.
In this example (above), I would like the find only the last pair of quotes
and substitute its contents with the same text, plus the HTML formatting
code.
Any help would be certainly appreciated.
--
....
`·.¸¸.·´¯`·.¸¸.·´¯`·-> rodney
Rodney Guest
-
James E Keenan #4
Re: Matching text question..
"Rodney" <NoSpamPlease@bellsouth.net> wrote in message
news:HtM6b.1970$66.1706@bignews5.bellsouth.net...It's not PERL code; it's Perl code.> I'm trying to place HTML Tags around the contents of Quoted material.
>
> I'm using the following PERL code:
Roll-your-own solutions to parsing HTML are not encouraged. Take this> $TextBlockToConvert =~ s/"(.+?)"/"<FONT Color=BLUE>\1<\/Font>"/g;
>
>
>
> Below, is an example of problem text this code chokes on.
>
> Example Text: msgStop("", "Invalid date")
>
opportunity to learn about the CPAN modules which have been developed and
fine-tuned for this purpose. One such module frequently cited on this list
is HTML::Parser.
James E Keenan Guest



Reply With Quote

