Step 1: Open up a browser and type regexpal.com on the address bar. Yo will get the online validator.
Step 2: Type or copy/paste the regex at the top window and the text to apply the regex on the second window.
As indicated in the footer, use RegexBuddy for a more powerful regex testing. The regex keywords are highlighted in blue. Also the matched phrase is also highlighted. In blue for the exact match and in yellow for any other string match.
The above example matches any string followed by one of "Monitoring", "MYAPP", or "CASHFORECAST". The "|" in regex means "OR". What if you want to literally match "Monitoring|MYAPP|CASHFORECAST"? You can escape "|" with "" as shown below.
Now, the "|" is not highlighted in blue as it is escaped.
Change the text as shown below. The "CASHFORECAST" is changed to "TRADEFORECAST" and match is no longer found as the text is not highlighted.
0 komentar:
Posting Komentar