
April 2nd, 2009, 07:20 AM
|
|
Contributing User
|
|
Join Date: Feb 2004
Location: köln, germany
Posts: 51
  
Time spent in forums: 11 h 23 m 2 sec
Reputation Power: 11
|
|
|
Match after n-th occurrence of something
Hello,
I have a string full of parameters separated by '|'s and am looking for a way to match the value after the n-th '|'. ( I know i could split them but ... you know ...)
I'm sure there a way to do this in regex ... but how??
my string looks something like this:
0|||word||otherword|||string_to_replace||
/\|{8}(.*)$/
is a really feeble attempt and obviously doesn't work but I should spare you of all the versions I tried.
Thankful for your hints:
thomas
|