close
Question by John C: What is the php regular expression to get everything before a certain character?

For instance, I have the following string:

table:column

I need to get "table" as the result of the php regular expression.

So, I need everything before the ":" symbol

After that regular expression is performed, I would also like to get everything after the ":" symbol, or "column" as well.


Best answer:

Answer by New S
Regular expressions are not used for this. Use tokenizing - function strtok, I believe.



What do you think? Answer below!

Related sites: Link , Link , Link , Link , Link

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 twkaho 的頭像
    twkaho

    KahoILoveMarket

    twkaho 發表在 痞客邦 留言(3) 人氣()