Last word in a sentence: In SQL (regular expressions possible?)

后端 未结 5 1480
夕颜
夕颜 2020-12-19 14:32

I need this to be done in Oracle SQL (10gR2). But I guess, I would rather put it plainly, any good, efficient algorithm is fine.

Given a line (or sentence, containing

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-19 14:44

    I'm not sure if you can use a regex in oracle, but wouldn't

    (\w+)\W*$

    work?

提交回复
热议问题