Username: 
Password: 
Restrict session to IP 

Level 3  Go to the Training: Regex challenge

1 2
Global Rank: 13289
Totalscore: 186
Viestit: 5
Kiitos: 10
Plus äänet: 11
Rekisteröitynyt: 12y 113d
Viimeksi nähty: 12y 107d
Käyttäjä ei ole paikalla
Level 3
Google/käännä2Kiitos!2Hyvä viesti!0Huono viesti! linkki
I'm sorry for posting so much, but I just can't seem to understand why my answer is being rejected in level 3.

This is the assignment:
Your pattern shall match all images with the name wechall.ext or wechall4.ext and a valid image extension.
Valid image extensions are .jpg, .gif, .tiff, .bmp and .png.

And I get this error:
Your pattern would match "wechall.jpg ", but it should not match it.

But from the explanation it seems to me that it should match it. Could someone explain this to me?
Global Rank: 252
Totalscore: 87258
Viestit: 1644
Kiitos: 1343
Plus äänet: 894
Rekisteröitynyt: 16y 123d




Viimeksi nähty: 2d 16h
Käyttäjä ei ole paikalla
RE: Level 3
Google/käännä1Kiitos!0Hyvä viesti!1Huono viesti! linkki
The challenge also checks against "wechall.jpg "
Note the whitespace at the end of this checked filename.

Cheers
gizmore
The geeks shall inherit the properties and methods of object earth.
Global Rank: 13289
Totalscore: 186
Viestit: 5
Kiitos: 10
Plus äänet: 11
Rekisteröitynyt: 12y 113d
Viimeksi nähty: 12y 107d
Käyttäjä ei ole paikalla
RE: Level 3
Google/käännä2Kiitos!2Hyvä viesti!0Huono viesti! linkki
Thanks
Global Rank: 12023
Totalscore: 309
Viestit: 2
Kiitos: 0
Plus äänet: 0
Rekisteröitynyt: 11y 335d
Viimeksi nähty: 11y 325d
Käyttäjä ei ole paikalla
RE: Level 3
Google/käännä0Kiitos!0Hyvä viesti!0Huono viesti! linkki
Hi,

i'm getting reject with "Your pattern would match "wechall3.png", but it should not match it."
But my regex only allows no numbers or a 4.. i have no idea how the check can come up with a 3 allowed?! Every RegEx tests like RegEx Coach / other online Tests said it will not recognize wechall3.png..

I don't want to to post the almost complete RegEx here and i cannot sent PMs yet. But basically what i do is check for "wechall" followed by number and the "possible" operator, followed by . extension..

Does anyone knows whats going on?
Global Rank: 252
Totalscore: 87258
Viestit: 1644
Kiitos: 1343
Plus äänet: 894
Rekisteröitynyt: 16y 123d




Viimeksi nähty: 2d 16h
Käyttäjä ei ole paikalla
RE: Level 3
Google/käännä0Kiitos!0Hyvä viesti!0Huono viesti! linkki
It shall only match wechall4 and wechall, but not wechall3 ... maybe that`s the problem?
Another thing might be that . means any char, so you maybe want to escape it like \.

Maybe it helps
gizmore
The geeks shall inherit the properties and methods of object earth.
Global Rank: 12023
Totalscore: 309
Viestit: 2
Kiitos: 0
Plus äänet: 0
Rekisteröitynyt: 11y 335d
Viimeksi nähty: 11y 325d
Käyttäjä ei ole paikalla
RE: Level 3
Google/käännä0Kiitos!0Hyvä viesti!0Huono viesti! linkki
It only checks vs the explicit 4. Not any number. Also i tried . oder \. - its no difference
Global Rank: 6227
Totalscore: 2020
Viestit: 5
Kiitos: 4
Plus äänet: 4
Rekisteröitynyt: 13y 171d
Viimeksi nähty: 3y 363d
Käyttäjä ei ole paikalla
RE: Level 3
Google/käännä0Kiitos!0Hyvä viesti!0Huono viesti! linkki
Hello challengers.
code(bmp|png|jpg|tiff|gif)
will show:
Lainaus käyttäjältä Unknown
Your pattern would capture a string, but this is not wanted. Please use a non capturing group.

How can i pass that without () grouping?

Can you give me a link or hint for?
greets grmf.
Global Rank: 252
Totalscore: 87258
Viestit: 1644
Kiitos: 1343
Plus äänet: 894
Rekisteröitynyt: 16y 123d




Viimeksi nähty: 2d 16h
Käyttäjä ei ole paikalla
RE: Level 3
Google/käännä4Kiitos!3Hyvä viesti!0Huono viesti! linkki
use a non capturing group (?:group|here)
The geeks shall inherit the properties and methods of object earth.
Global Rank: 6227
Totalscore: 2020
Viestit: 5
Kiitos: 4
Plus äänet: 4
Rekisteröitynyt: 13y 171d
Viimeksi nähty: 3y 363d
Käyttäjä ei ole paikalla
RE: Level 3
Google/käännä0Kiitos!1Hyvä viesti!0Huono viesti! linkki
Lainaus käyttäjältä Unknown
Correct, let`s see if you can come up with a pattern for the next problem.

Thank you! i have searched since hours but not seen that hint.
Global Rank: 195
Totalscore: 107538
Viestit: 14
Kiitos: 12
Plus äänet: 7
Rekisteröitynyt: 11y 301d



Käyttäjä ei ole paikalla
RE: Level 3
Google/käännä2Kiitos!1Hyvä viesti!0Huono viesti! linkki
Here you have the definition (and difference between others) of non capturing group.
http://www.regular-expressions.info/refadv.html
Regards.
1 2
sisyang, Redknee, AIHAPPLE, zhukeni, alibaba2024, tunelko, silenttrack, n0tHappy, quangntenemy, TheHiveMind, Z, balicocat, Ge0, samuraiblanco, arraez, jcquinterov, hophuocthinh, alfamen2, burhanudinn123, Ben_Dover, stephanduran89, braddie0, SwolloW, dangarbri, kalungmas on lisännyt aiheen seurantalistalle ja vastaanottaa sähköpostia uusista viesteistä.
1 ihmistä katsoo aihetta tällä hetkellä.
Tätä aihetta on katsottu 76120 kertaa.