Help needed formatted submit results - Changing data

Discussion in 'Perl' started by Robert V, Jul 18, 2003.

  1. Robert V

    Robert V Guest

    Hi all, another area I could use some help with is changing submitted data
    based on the data conditions ... I will elaborate. I have a form textarea
    where a user can type in some text. This text is sent to a perl script that
    eventually will send that data to someone by email in HTML format. Here is
    where I need some help.

    If a user was to type in a web address www.mysite.com etc, in the text box,
    I would like my script to detect web addressed and add the necessary HTML
    tags before and after ... this is needed because unlike MIME email, HTML
    email must have the A HREF tags in order for the link to become hyperlinked.
    So here is what I need ... a code example that will detect a web address in
    the submitted data and add the

    <a href="http://www.mysite.com">www.mysite.com"</a>

    tags before and after the found web address. I see Perl Forum scripts do
    this all the time but i have no idea how it's done. If you are able to
    provide an example that would be wonderful. Thankx!

    RV
    Robert V, Jul 18, 2003
    #1
    1. Advertising

  2. Robert V

    Jim Rendant Guest

    Robert V <> wrote in message
    news:45SRa.482188$...
    > Hi all, another area I could use some help with is changing submitted data
    > based on the data conditions ... I will elaborate. I have a form textarea
    > where a user can type in some text. This text is sent to a perl script

    that
    > eventually will send that data to someone by email in HTML format. Here is
    > where I need some help.
    >
    > If a user was to type in a web address www.mysite.com etc, in the text

    box,
    > I would like my script to detect web addressed and add the necessary HTML
    > tags before and after ... this is needed because unlike MIME email, HTML
    > email must have the A HREF tags in order for the link to become

    hyperlinked.
    > So here is what I need ... a code example that will detect a web address

    in
    > the submitted data and add the
    >

    try something like "<a href=\"http://".$sitename.\">".$sitename,"\"</a>"
    thant should do it!
    > <a href="http://www.mysite.com">www.mysite.com"</a>
    >
    > tags before and after the found web address. I see Perl Forum scripts do
    > this all the time but i have no idea how it's done. If you are able to
    > provide an example that would be wonderful. Thankx!
    >
    > RV
    >
    >
    Jim Rendant, Jul 19, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Monique Y. Mudama
    Replies:
    1
    Views:
    443
    Monique Y. Mudama
    Jun 28, 2005
  2. Replies:
    2
    Views:
    6,170
  3. lovecreatesbeauty
    Replies:
    8
    Views:
    1,630
    Old Wolf
    Sep 12, 2005
  4. Ken Fine
    Replies:
    3
    Views:
    521
    Steven Cheng [MSFT]
    Jul 23, 2008
  5. Replies:
    2
    Views:
    343
Loading...

Share This Page