0

Possible Duplicate:
Regex for matching javadoc fragments

I have files having content like

/**
 * Some Content
 * @param ..
 * @author ..
 *
 */
function a_sample_function ( $args = '' ) {

I need to extract the text

Some Content
@param ..
@author ..

given a function name a_sample_function ( the * can be removed by a gsub later I believe)

I'm writing this in ruby.

Community
  • 1
  • 1
Dogbert
  • 212,659
  • 41
  • 396
  • 397
  • 1
    PHP actually provides a way for extracting DocBlock comments using the Reflection API. I know you're writing a utility in Ruby, but maybe it would be worthwhile to have a PHP script to use as a bridge for extracting these comments? See: http://us3.php.net/manual/en/reflectionclass.getdoccomment.php (there's a similar API for functions) – awgy Apr 19 '10 at 17:56

1 Answers1

0

Managed to solve this with the help of Regex for matching javadoc fragments Thanks!

Community
  • 1
  • 1
Dogbert
  • 212,659
  • 41
  • 396
  • 397