Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

【Perl】Subroutines in regex?【Amateur】

Name: Anonymous 2011-04-17 3:58

Can I use subroutines in regex?

For example, is it possible to do something like:

$string =~ /<Text (example)>/<Text convert_text($1)>/g;


I know that doesn't work like that, but is there a way to do something like that?

Name: Anonymous 2011-04-17 5:20

So if I wanted to parse a link, such as This is a link to be <a href="This_is_a_link">This is a link</a> I couldn't do that with one substitution?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List