MyBB Community Forums

Full Version: Mycode problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

i want to extract a part of an url.

https://www.youtube.com/(.*?)

and then want to place the extracted into some tag

[jau]$1[/jau]

but all i get in a test is

Quote:[jau][/jau]watch?v=TJuWszB51Sc

how can i ensure that the $1 is placed within the tags?

Edit:

MyBB 1.8.37

I think it is a bug.

if i use

Quote:<strong>$1</strong>

then same result

Quote:<strong></strong>watch?v=TJuWszB51Sc

so i think the handling in which order the replacement is processed is not "from left to right", but "anything non-$1 first and then set $1 behind that all". And that is wrong, a bug.

here some pics so maybe it is better to understand

[attachment=46603]

[attachment=46604]

and now the special one

Quote:gfgfhgfhgfhgfhgfhgf $1 jhgjhgjhgjhgjhg

yeah, you already know

Quote:gfgfhgfhgfhgfhgfhgf  jhgjhgjhgjhgjhgwatch?v=TJuWszB51Sc

whereas it is interesting that without html/bbcode it shows

Quote:Actual Result
The area below shows the actual result when the HTML is rendered.
gfgfhgfhgfhgfhgfhgf jhgjhgjhgjhgjhgwatch?v=TJuWszB51Sc

so all the letters where processed too. Whereas in the example with e.g. "<strong>", the tag is not seen in the "actual result" picture

Heeeee! Hooooo! (.*) rules! The "?" destroys all. Without it all works fine Smile