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

Fobbbbbb

Name: Anonymous 2012-10-11 22:50

I want to do a regex operation on datafiles to convert decimals to Roman numerals.

I wanted to do something like

str_replace_all("blahblah02 blahblahblah03 blahblahbla05", "([0-9]{2})", convertToRomanNumeral("\\1"))

however, this replacement doesn't work...as in, the third parameter should be a string and i have given it a function


How am I supposed to do this?

Name: Anonymous 2012-10-11 23:02

okay well then i'm gonna have this list of replacements like  this

str_replace_all("blah02 blah03 blah05", "blah01", "blahI")
str_replace_all("blah02 blah03 blah05", "blah02", "blahII")
str_replace_all("blah02 blah03 blah05", "blah03", "blahIII")
str_replace_all("blah02 blah03 blah05", "blah04", "blahIV")
str_replace_all("blah02 blah03 blah05", "blah05", "blahV")
str_replace_all("blah02 blah03 blah05", "blah06", "blahVI")
str_replace_all("blah02 blah03 blah05", "blah07", "blahVII")
str_replace_all("blah02 blah03 blah05", "blah08", "blahVII")
str_replace_all("blah02 blah03 blah05", "blah09", "blahVIII")
str_replace_all("blah02 blah03 blah05", "blah10", "blahIX")
str_replace_all("blah02 blah03 blah05", "blah11", "blahX")

up until 26 (number of chromosomes)
that's enterprise quality shit

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