Jump to content


Photo

unknown modifier


  • Please log in to reply
2 replies to this topic

#1 mb81

mb81
  • Members
  • PipPipPip
  • Advanced Member
  • 120 posts

Posted 23 September 2006 - 08:37 PM

Except for a script that I copied and successfully used, i am a complete novice at regex, but I am trying to do something really simple, but can't get it to work:
preg_match_all('<td class="center">.</td>',$data,$completegames);

I keep getting an error "unknown modifier";

I have used . , \w , \w{1}, and [A-Z] and none of them have worked. It's probably something that I missed in the execution or options.

Can anyone help me with this?






#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 25 September 2006 - 04:16 PM

You're not specifying a delimiter; try /<td class="center">.</td>/.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 mb81

mb81
  • Members
  • PipPipPip
  • Advanced Member
  • 120 posts

Posted 25 September 2006 - 04:37 PM

That got me on the right track, thanks.

This is what ended up working: \<td class="center">.<\/td>\

Thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users