get me right - 21/01/05 10:58 PM
hey there, need help with a regex problem.
i have a string from which i need to get the part where a space occurs between a word and another word (which beings with a *)
ex:
blah blah this_word *another_word
i need to output this_word *another_word, and all other occurences of the pattern. this is what i have so far:
doesn't work quite right tho
i have a string from which i need to get the part where a space occurs between a word and another word (which beings with a *)
ex:
blah blah this_word *another_word
i need to output this_word *another_word, and all other occurences of the pattern. this is what i have so far:
Code:
/regtest { var %s = sumthin here*sumthin else *another thing*blah blabber *another occurence if ($regex(%s,/([[:space:]]\*.*[[:space:]])/g) > 0) { var %regml = 1,%regmsg while (%regml <= $regml(0)) { %regmsg = $addtok(%regmsg,$regml(%regml),44) inc %regml } } }
doesn't work quite right tho