php - visual basic regex mode/pattern modifier -


i ran trouble. i'm testing regex in php (not in asp.net app, long takes me while)

$pattern = '~<table.*>(.*?)</table>~s'; 

i need convert line vb format. including 's' modifier (at end of regex)

i doubt code covers need

dim tableexpression = "<table.*>(.*?)</table>" 

many flavors give option of putting modifiers in regex itself, so:

dim tableexpression = "(?s)<table.*>(.*?)</table>" 

(?s) called inline modifier, , can read here. works in of major languages, including .net , php. notable holdout javascript, incredibly frustrating because means can't case-insensitive matches in asp.net validator unless disable client-side validation.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -