Results 1 to 2 of 2

Thread: Perl RegEx Issue

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517

    Perl RegEx Issue

    I want to search for commas that are together, and replace with one.

    For example "one,two,,three,,," should then be "one,two,three"

    this is the code I came up with.

    Why is it wrong??

    $SQL =~ s/[,+]/,/gs; #correct errors.

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517

    FIXED

    $SQL =~ s/,+/,/gs; #FIXED

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width