Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 257 Vote(s) - 3.63 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Meaning of (?s) in regex

#1
I am very new to the regular expression arena. Recently I searched for a regular expression for Powershell that allows me to match a html tag <table> and I found the following in this site.

$content -match '(?s)<table[^>]+width\s*=\s*"300px"\s*.*?>(.*?)</table>'

I have been looking for all regular expressions references and books (Perl and Powershell) for the meaning of (?s) with no luck. It looks like a condition but missing the then part.

Can someone point me to the right direction for the meaning of this?

Thanks
Reply

#2
"?" means 1 or 0 matches. "?s" enables dot matching newlines. A period is normally a wildcard that will match any character, save the newline.
Reply

#3
According to [Regular Expressions reference site][1].

> Turn on "dot matches newline" for the remainder of the regular
> expression. (Older regex flavors may turn it on for the entire regex.)


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through