Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

need help for find and replace regular expression

  •  07-02-2008, 2:58 PM

    need help for find and replace regular expression

    hi,

     Input : 1,This,is,test,data,100,+66,22+12,567,..,+34
    Output: 1,This is test data,100,+66,22, +12,567,..,+34

    I'm trying to use the regular expression in C# to replace the above
    Input string to get the above given output string.

    Basically i'm trying to do the followings

    1. if any comma (,) is there between two alphabets that needs to be replaced with space charater
    2. if any "+" sign between two numeriec that needs to be replaced with ",+"

    I have used this expression [A-Za-z],[A-Za-z] to find the 1st scenerio but dont know
    what to use for the replace expression.

    I really appreciate your help on this.

    thanks in advance.

    I'm trying to use the regular expression in C# to replace the above
    Input string to get the above given output string.

    Basically i'm trying to do the followings

    1. if any comma (,) is there between two alphabets that needs to be replaced with space charater
    2. if any "+" sign between two numeriec that needs to be replaced with ",+"

    I have used this expression [A-Za-z],[A-Za-z] to find the 1st scenerio but dont know
    what to use for the replace expression.

    I really appreciate your help on this.

    thanks in advance.

    Filed under:
View Complete Thread