Jump to content

[SOLVED] Regex Confusion


shane18

Recommended Posts

 

1: /(.+)(.+)/
2: /(.+?)(.+)/

 

>Expression 1

-Turns BLAH into  1> BLA  2> H

 

>Expression 2

-Turns BLAH into  1> B      2> LAH

 

  • If you can explain why this happens in great detail?
  • If you can answer this by showing how the engine figures this regex pattern out in great detail?
  • I'll be set when it comes to making regex patterns.

Link to comment
https://forums.phpfreaks.com/topic/175410-solved-regex-confusion/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.