Web
Opt
tools
Configuration
Input String
Search String
Method
match()
search()
Run Visualization
1
Console Output
>
Visual Output
Input String
Hello World
Search String
World
Method
match()
Result
World
Method Comparison
match():
Returns an array of matches found using a regular expression, or null if no match is found.
search():
Returns the index of the first occurrence of a substring in a string, or -1 if not found.