Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Text validation problem

by lily123 (Novice)
on Sep 02, 2004 at 12:10 UTC ( #387878=perlquestion: print w/replies, xml ) Need Help??
lily123 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Guys

I have the below doubts. Im working on text validation (reporting errors with a word file). Im using Win32::Ole to interact with word.
1) how to identify if a word is surrounded by parentheses or not? any modules available thro' which i can check whether any junk of text is enclosed in parenthes?

Modules containing all units(in abbr. and expaned form)

Module containing Us and its Uk version of english words.?

Have anyone done validatoin of word file differently or is it possible to do it effectively thro' perl?
Any suggestion regd. the above is most welcome

Replies are listed 'Best First'.
Re: Text validation problem
by Crian (Chaplain) on Sep 02, 2004 at 12:16 UTC

    > Have anyone done validatoin of word file differently or is it possible to do it effectively thro' perl?

    I validate text files (no word files, just plain ascii) with Perl. Perl is very good at this. For catching parenthesis I wrote my own function, I do not know of any module that does this. You have to work around a few problems like not closed open parenthesis or else like this, but in general you can relative easily catch the parenthesis with regular expressions.

Re: Text validation problem
by Anonymous Monk on Sep 02, 2004 at 13:32 UTC

      I think my post above has been downvoted because I use my own function and not the module mentioned above. As far as I know can it only say, if the string is in parenthesis or not, but it can not handle strings with parts in parenthesis. My function insertes XML-Tags that show matching or not matching parenthesis and much more, thats why I have to do it my own way. I just wanted to show, that Perl is very good in string handling and tasks like the one of the original poster can be done with Perl very well. I think there is no reason for downvoting. If you have a problem with that tell me, but don't downvote.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://387878]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2018-07-19 11:58 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (406 votes). Check out past polls.