File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 9
9
10
10
$ regex = new VerbalExpressions ;
11
11
12
- $ regex ->startOfLine ()
13
- ->then ("http " )
14
- ->maybe ("s " )
15
- ->then (":// " )
16
- ->maybe ("www. " )
17
- ->anythingBut (" " )
18
- ->endOfLine ();
12
+ $ regex ->startOfLine ()
13
+ ->then ("http " )
14
+ ->maybe ("s " )
15
+ ->then (":// " )
16
+ ->maybe ("www. " )
17
+ ->anythingBut (" " )
18
+ ->endOfLine ();
19
19
20
20
if ($ regex ->test ("http://github.com " ))
21
21
echo "valid url " . '<br> ' ;
30
30
31
31
echo "<pre> " . $ regex ->getRegex () ."</pre> " ;
32
32
33
- echo $ regex ->clean (array ("modifiers " => "m " , "replaceLimit " => 4 ))
34
- ->find (' ' )
35
- ->replace ("This is a small test http://somesite.com and some more text. " , "- " );
33
+ echo $ regex ->clean (array ("modifiers " => "m " , "replaceLimit " => 4 ))
34
+ ->find (' ' )
35
+ ->replace ("This is a small test http://somesite.com and some more text. " , "- " );
You can’t perform that action at this time.
0 commit comments