Are there such things?
Like for example, S -> aSb | ^ (possible words: ^, ab, aabb, aaabbb, aaaabbbb, ...)
From what I've learned, the only regex that closely match the said grammar is: a*b*
But the regex can produce words such as aab, abb, ... where a's and b's aren't equal.
Is there a solution to this? Something like: a*b* if #a = #b
EDIT: I think there is no solution to this.
What is the correct explanation for this? This is actually a snippet of my homework, and I really don't know what to answer since there are no solutions in translating the grammar to regex.