I frequently need to create regular expressions for use in scripts (mostly when used in sed), however, I find, sometimes the regular expressions get very complicated and difficult for me to understand and edit. Is there any software which allows one to visually creates the code for regular expressions, which I can then copy and paste into a script?
|
|
||||
|
|
|
How about Visual Regexp?
|
|||||||
|
|
How about kregexpeditor |
|||
|
|
|
Try txt2regex and see if that helps. I've never used it seriously, but it seemed cool when I tried it out. |
|||
|
|
|
Yes, text2re.com should be close to what you're looking for. Given source text, you can choose to generate a regex that matches any of the given text. The tool generates code for a smattering of languages, as well. The regex builder UI (step 2 on the page) is slightly difficult to learn; note that hovering over any of the options explains the object against which you're matching:
|
|||
|
|
|
I'm not quite sure what you mean by "visually create the code" (do you mean a GUI tool?). If you are like me, I find it impossible to work with complex regular expressions, unless I lay them out in a structured manner, so I can get a better visual representation of the logic. Really, A very handy feature of The issue with Perl regex has some useful features to assist in laying out complex patterns; eg. the ability to ignore whitespace in your expression.. (As a challenge, and for the expereince factor, I wrote a The best tool to help you is: experience. eg. Tackling the regex questions on this site is a great way to get that experience... I feel that GUI tools don't really help much, because they inhibit the experience... In summary, the best helper tools are experience and structured layout, and read the manual (in detail).. I've used the word "expereince" a lot.. by it I mean that the act of preparing regular-expressions (and in the case of |
|||||||
|


