MyBB Community Forums

Full Version: Question about my steam widget MyCode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here is my steam widget MyCode

Regular Expression
\[steam\]((http:\/\/www\.|www\.|https:\/\/www\.|http:\/\/|https:\/\/)?store.steampowered.com/app/)?(\d+)(/.+)?\[/steam\]

Replacement
<iframe src="https://store.steampowered.com/widget/$3" frameborder="0" style="width: 100%; height: 190px;"></iframe>

my question is why i can't use 2 steam widget mycode in 1 post?

ie:

[steam]https://store.steampowered.com/app/627270/Injustice_2/[/steam]

[steam]https://store.steampowered.com/app/418460/Rising_Storm_2_Vietnam/[/steam]

it'll only show the first oneĀ 

i think it might be something wrong with my regular expression?


changed my regex to

\[steam\]((http:\/\/www\.|www\.|https:\/\/www\.|http:\/\/|https:\/\/)?store.steampowered.com/app/)?(\d+)(/\w+/)?\[/steam\]

seems to be working now

any suggestion to the regex is welcomed Big Grin