Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2009
    Location
    Massachusetts, MA
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Regular expression syntax

    Do most programming/computer languages use basically the same syntax for regular expressions as Unix programs like grep and vi? I've been having trouble learning regexps because they seem to be different for each language, like in SQL the symbol for a single character is an underscore while in the vi editor it's a period. vi is my first experience with regular expressions, and I have written a spellchecker script for vi that relies heavily on them. It would make work easier if I could go into using other programs and languages and find a familiar and ubiquitous syntax for regexps. Is there any such standard syntax?

  • #2
    Regular Coder
    Join Date
    Jun 2007
    Location
    USA
    Posts
    527
    Thanks
    26
    Thanked 74 Times in 72 Posts
    Here are the most common ones
    http://en.wikipedia.org/wiki/Perl_Co...ar_Expressions
    http://en.wikipedia.org/wiki/Regular_expression#Syntax

    Almost every language I've seen use very similar (if not the same) regex syntax.
    Trinithis


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •