struggling with regexp

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sticks

    struggling with regexp

    im trying to create a regexp that will work on data that is arranged thusly:
    92291A , C92291A , 140191A , REM92291A

    this data comprises of any number of model names with a space, a comma and a
    space delimiting them and a space at the start and end of the string.

    i wish to be able to remove any one of those elements and still retain the
    arrangement of the data and delimiting.

    thanks for your help
    sticks


  • P'tit Marcel

    #2
    Re: struggling with regexp

    Sticks écrivit:
    [color=blue]
    > im trying to create a regexp that will work on data that is arranged
    > thusly:
    > 92291A , C92291A , 140191A , REM92291A[/color]

    no need for a regexp :

    explode(' , ' , trim($chaine))

    will provide you with an array containing each model name


    --
    P'tit Marcel

    Comment

    Working...