how do i convert a c# regular expression to php...

by 3 replies
4
I'm rusty as hell in php and need to fix a small bug in one of my plugins. I know the regex I could use would be written in c# as such:

(?<!<[^>]*)keyword

[>].*(keyword).*[<]

I don't for the life me remember how different regex is in php.

- Reilly
#programming #convert #expression #php #regular
  • I don't know c# regex, but be aware that the ereg functions in PHP have been deprecated, you'll need to use the PCRE 'preg' functions.
    • [ 1 ] Thanks
  • If this helps shed some light... PHP preg is just using Perl's regular expression syntax.

Next Topics on Trending Feed