as title
2007-03-10 00:55:10 · 1 個解答 · 發問者 judy 1 in 電腦與網際網路 ➔ 程式設計
Many unix/linux related utilities(vi, perl) and other languages (Java, SQL) use regular expressions to search for patterns.
We write a 'pattern' to match for texts. The pattern can be simply a normal text, for example:
/ABC/ will match 'As easy as ABC.', because the pattern ABC is present in the given string.
On the other hand,
/ABC/i will match any combination of cases, so a match will be found for
'As easy as Abc' or 'As easy as abc'.
Sometimes, to match only certain combinations of characters, we can use the character group:
/[abc][ABC]/ will match any combination of one letter of a,b or c followed by A, B or C, such as aB, cA, aA, etc.
It is a very interesting subject if you are in programming, or using utilities like Perl, awk, vi, sed, grep, Java or SQL.
You can find more information at the following link:
http://www.english.uga.edu/humcomp/perl/regex2a.html
2007-03-10 01:19:10 · answer #1 · answered by p 6 · 0⤊ 0⤋