Questions tagged [regular-expressions]

Regular expressions or Regex is a search pattern for strings defined by a sequence of characters.

A regular expression (shortened as regex or regexp) is a sequence of characters that specifies a search pattern. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation. It is a technique developed in theoretical computer science and formal language theory. The phrase regular expressions, or regexes, is often used to mean the specific, standard textual syntax for representing patterns for matching text, as distinct from the mathematical notation described below. Each character in a regular expression (that is, each character in the string describing its pattern) is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.

673 questions
0
votes
1 answer

How would I draw a state transition diagram to satisfy this regular expression?

I somewhat understand finite state machines in concept however am unsure how I would apply it in this example. The question is Draw the transition diagram of a finite state recogniser which accepts precisely those strings which satisfy the regular…
HS'
  • 41
0
votes
0 answers

One-to-one correspondance between regular sets

I have problem with one-to-one correspondance "One-to-one correspondence with the set (B) of all tags possible being represented with their binary representation (i.e. 0, 01, 00, 010101, 11000, 01010, 11 etc.) and the set of natural numbers. Prove…
0
votes
2 answers

Are regular expressions in mathematics related to PCRE or POSIX regexps?

I've recently come across a number of questions tagged with (regular-expressions), and talking about some type of regular expressions, here's an example of such question. I know about regular expressions as implemented in perl (so called PCRE) and…
Ruslan
  • 6,775
-1
votes
1 answer

regular expression decoding

Can someone please points out why it is true. it is from "Introduction to the theory of computation_third edition - Michael Sipser" Page 65. Assume that Alphabet E is {0,1}. Thank you.
Dmomo
  • 143
-2
votes
1 answer

Need help with this regular expression

Give a regular expression that describes the language accepted by the illustrated FSA. State $0$ is the initial state.
1 2 3 4 5
6