I'm reading Flex & Bison from O'Reilly, and would like to know if learning Regular Expressions beforehand will help in developing a programming language?
Regular expressions can be defined using formal language theory, so they're complementary concepts.
It would be a good idea to have a good understanding of both regular expressions and formal language theory before starting to build a language.
So to answer your Boolean question: Yes.
Regular expressions for conventional programming languages' syntax are quite simple, so, strictly speaking, you don't need to be a regexp expert to write a compiler. On the other side, regexp belongs to basic programming skills, so I'd say you need to know them... for pretty much everything.
If you were creating an interpreted language, you can use regex to identify the various atoms in a line of code.
Maybe I'm off track because the other answerers think you're asking about PCRE or something. But if you're talking about inventing a language, then regular expressions are about as important as the syntax and anything else.
Regular Expressions are a step on the Chomsky Hierarchy between Push Down Automata and Deterministic Finite Automata, very important stuff to know about and exceptionally necessary when parsing anything, especially code.
I'd say so. Sounds like you've run across the Flex scanner in Example 1.3 of Flex & Bison (p. 5):
/* recognize tokens for the calculator and print them out */
%%
"+" { printf("PLUS\n"); }
"-" { printf("MINUS\n"); }
"*" { printf("TIMES\n"); }
"/" { printf("DIVIDE\n"); }
"|" { printf("ABS\n"); }
[0-9]+ { printf("NUMBER %s\n", yytext); }
\n { printf("NEWLINE\n"); }
[ \t] { }
. { printf("Mystery character %s\n", yytext); }
%%
As you've seen, NUMBER, whitespace, and mystery character are defined using simple regular expressions (well, the others are too, but they're not very interesting). Your programming language will doubtless use other regexes (eg, think about tokens for hex literals, octal literals, float/doubles and comments in C/C++/Java). They're also a useful technique for programming in general, so I'd go ahead and learn something about them now.