2

コンマ区切りリストの最後のコンマ以降のすべてを返す正規表現を作成しようとしています。

// So if my list is as followed
var tag_string = "red, green, blue";

// Then my match function would return
var last_tag = tag_string.match(A_REGEX_I_CANNOT_FIGURE_OUT_YET);

// Then in last tag I should have access to blue

// I have tried the following things: 
var last_tag = tag_string.match(",\*");

// I have seen similar solutions, but I cannot figure out how to get the only the last string after the last comma.
4

4 に答える 4