# Learning regular expressions



## Erratus (Mar 5, 2010)

Need hints on how to learn regexes quickly by hack and look. Any ports or developing programs which can do this on freebsd? Found some interesting windows-solutions (RegexBuddy) but so far none UNIX/freebsd.


----------



## DutchDaemon (Mar 5, 2010)

regex(3) and re_format(7) not enough?

[cmd=]cd /usr/ports && make search key=regular[/cmd] (or [cmd=]psearch regular[/cmd] if you have ports-mgmt/psearch installed) will also turn up some stuff, like e.g. misc/gregexp and misc/txt2regex.


----------



## Erratus (Mar 5, 2010)

DutchDaemon said:
			
		

> regex(3) and re_format(7) not enough?


No, that's not what I'm looking for. I definitivly have read all related man/info pages. 
I'm looking for something like a debugger for regular expressions.


----------



## graudeejs (Mar 5, 2010)

just did psearch and here's something that might help (haven't tried myself):

```
[port]textproc/redet[/port]            Visual regexp development and execution
[port]misc/gregexp[/port]              A graphical regular expression explorer
[port]misc/tkregexp[/port]             An interactive regexp design tool
[port]misc/txt2regex[/port]            A Regular Expression "wizard"
```

perhaps something of this will help you


----------



## DutchDaemon (Mar 12, 2010)

http://code.google.com/p/re2/


----------



## thuglife (Mar 12, 2010)

..and some benchmarks
http://swtch.com/~rsc/regexp/regexp3.html


----------



## wonslung (Mar 14, 2010)

i use this:

http://erik.eae.net/playground/regexp/regexp.html


it's a web based regex checker.  works well for me


----------

