Hi!
I'm trying to do a search-replace in places where some groups are
optional... Here's an example:
re.match(rImage:([^\|]+)(?:\|(.*))?, Image:ola).groups()
('ola', None)
re.match(rImage:([^\|]+)(?:\|(.*))?, Image:ola|).groups()
('ola', '')
re.match(rImage:([^\|]+)(?:\|(.*))?,
Hugo Ferreira wrote:
Hi!
I'm trying to do a search-replace in places where some groups are
optional... Here's an example:
re.match(rImage:([^\|]+)(?:\|(.*))?, Image:ola).groups()
('ola', None)
re.match(rImage:([^\|]+)(?:\|(.*))?, Image:ola|).groups()
('ola', '')
Hugo Ferreira wrote:
Hi!
I'm trying to do a search-replace in places where some groups are
optional... Here's an example:
re.match(rImage:([^\|]+)(?:\|(.*))?, Image:ola).groups()
('ola', None)
re.match(rImage:([^\|]+)(?:\|(.*))?, Image:ola|).groups()
('ola', '')