Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Make a Dot Match Newline in the re Module in Python

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Comment

  1. Pass re.DOTALL to the option flags to make a dot match newlines as well.

select
       c1, 
       c2
    from
        db.table
    
db.table

    select
        count(*) as total,
        count(case
                when item_site_id = 15 then 1
                else 0
            end) as total_au
    from
        db.table
    
db.table
['abc']
'nima'