24. apr. 2006

Regular Expression Examples

When using regular expressions (a very brief description):
  • .* = (any character)
  • $ = end of line
  • ^ = start of line
  • \1 first group in replacement.
Example:
Text: Hello my friend
Search for: (.*) my (.*)
Replace with: \2 is \1
Result: friend is hello

    Ingen kommentarer: