I have it:
/** * @file * API for loading and interacting with modules. * More explaination here. * * @author Reveller < me@localhost > * @version 19:05 28-12-2008 */
I am looking for a regex to delete everything except @token data, so the result will look like this:
@file API for loading and interacting with modules. More explaination here. @author Reveller < me@localhost > @version 19:05 28-12-2008
Now I have this:
$text = preg_replace('/\r?\n *\* */', ' ', $text);
Performs this task partially: it deletes only * before each line. Who could help me is the strips / **, and the last slash? Any help would be greatly appreciated!
PS: If, for example, commentlbock contains something like
/** * @foo Here some slashes for ya: / and \ */
Then, obviously, slashes after @foo cannot be deleted. The result should be:
@foo Here some slashes for ya: / and \
I hope there is a regular expression guru there :-)
Pr0no source share