paulonline2501 Posted April 18, 2011 Share Posted April 18, 2011 hi,im having a little trouble with my regexp_substr.i have two problems in brief: i cant get muliple results back for each search where there could be more than on matching string the last two '>>' are missing from the code.detail description 1:==============im currently only getting back one row for the first express i find.i would except to find multpi rows as the expression can be in the string multiple times.i want a row for each result - not just the firstwhat im looking for is <<@xxxxxxxx>>i dont know what xxxxxxx is but i know it starts <<@ and ends >>.and to repeat myself i want to get back all matches - my code currently only brings back the first match.so in the example <<@123>> is found but <<@124>> is missed.CUT DOWN EXAMPLE OF CODEselect regexp_substr('qweqwe<<@123>>qweqweqweqwe<<@124>>qweqwe', '<<@[^>>]+')from my_tableMY ACTUAL CODEselect srl_code, TO_NCHAR(regexp_substr(srl_text, '<<@[^>>]+'))||'>>' as "slp" --substr(,4)from men_srl where TO_NCHAR(regexp_substr(srl_text, '<<@[^>>]+')) is not nullorder by 'slp'detail description 2:===============the result is dropping the trailing >> for some reason.i want this to be included.thanks guys Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.